Skip to content

v2.0.0

Latest
Compare
Choose a tag to compare
@sator-imaging sator-imaging released this 17 Dec 08:47
· 3 commits to main since this release
b669b65

HUlid v2 Design Note

Half ULID version 2 stores year offset in 1-127 range, formerly in range from 0 to 127.

The reason of update is that there are 2 famous epoch years, 1970 (UNIX) and 1900 (NTP). Those are used to calculate UNIX time and NTP time which are stored as elapsed time from epoch year.

The minimum value of Half ULID v2 HUlid.MinValue is changed to extremely high number 144,115,188,075,855,872 (1UL << 57).
It points around A.D. 4,500,000 in UNIX time and when trying convert it to DateTime object, C# throws unhandled exception.

Updated design makes non-explicitly typed HUlid (a long primitive) identifiable and meaningful.

Full Changelog: v1.3.0...v2.0.0