You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: add TODO section comparing missing API with original DJB libtai
Add comprehensive TODO section documenting API functions from the original
DJB libtai implementation that are not yet implemented in this Go port:
- TAIA (TAI64NA) high-precision time operations with attosecond precision
- Calendar operations (caldate and caltime)
- Advanced leap second management beyond current basic implementation
Signed-off-by: Nagy Károly Gábriel <[email protected]>
The following API functions from the original DJB libtai implementation are not yet implemented in this Go port:
261
+
262
+
### High-Precision Time (TAIA - TAI64NA)
263
+
-**TAIA support**: TAI64NA (1-attosecond precision) time format and operations
264
+
-`taia_now()` - Get current time with attosecond precision
265
+
-`taia_add()`, `taia_sub()` - Arithmetic operations for TAIA
266
+
-`taia_pack()`, `taia_unpack()` - Serialization for 16-byte TAIA format
267
+
-`taia_less()` - Comparison operations
268
+
-`taia_half()` - Divide time by 2
269
+
-`taia_approx()` - Convert to floating-point approximation
270
+
-`taia_frac()` - Extract fractional part
271
+
-`taia_fmtfrac()` - Format fractional seconds
272
+
273
+
### Calendar Date Operations (caldate)
274
+
-**Calendar date handling**: Year-month-day operations and conversions
275
+
-`caldate_frommjd()` - Convert from Modified Julian Day number
276
+
-`caldate_mjd()` - Convert to Modified Julian Day number
277
+
-`caldate_normalize()` - Normalize invalid dates (e.g., Feb 30 → Mar 2)
278
+
-`caldate_fmt()`, `caldate_scan()` - String formatting and parsing
279
+
-`caldate_easter()` - Calculate Easter date for given year
280
+
281
+
### Calendar Time Operations (caltime)
282
+
-**Calendar time with timezone**: Complete date/time with UTC offset
283
+
-`caltime_tai()` - Convert from TAI to calendar time in UTC
284
+
-`caltime_utc()` - Convert from calendar time to TAI
285
+
-`caltime_fmt()`, `caltime_scan()` - String formatting and parsing
286
+
287
+
### Leap Second Management (leapsecs)
288
+
-**Advanced leap second handling**: Beyond the current basic implementation
289
+
-`leapsecs_init()` - Initialize leap second table
290
+
-`leapsecs_read()` - Read leap second data from file
291
+
-`leapsecs_add()` - Add leap seconds to TAI time
292
+
-`leapsecs_sub()` - Subtract leap seconds from TAI time
293
+
294
+
### Missing Comparison and Utility Functions
295
+
-**TAI64/TAI64N comparisons**: `tai_less()`, `tain_less()` for time ordering
296
+
-**Validation functions**: Input validation for packed formats
297
+
-**Extended arithmetic**: More comprehensive overflow handling
298
+
299
+
**Priority**: Calendar operations (caldate/caltime) would provide the most value for general-purpose time handling, followed by TAIA support for ultra-high-precision applications.
300
+
258
301
## License
259
302
260
303
This software is released into the public domain. See [UNLICENSE](UNLICENSE)
0 commit comments