Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@uhs/universal-timestamp
Advanced tools
A variable precision string sortable timestamp representing billions of years down to millisecons
MYYY,YYY,YYY,YYY+DDD#HH:MM:SS.sss
Where
The Universal Timestamp should:
Every timestamp is the same length, regardless of offset amount or precision.
Dates are expressed as offsets in years, days, hours, minutes, seconds, and milliseconds from a meridian. The meridian is borrowed from the Gregorian calendar.
The first character identifies if the date expressed is before or after the meridian. A "<" character signifies a year before AD 1 on the Gregorian calendar, and a ">" indicates AD 1 or later.
If a timestamp begins with "<", indicating a year before AD 1, the year is expressed with the most significant digit on the right side, the number being padded on the left with the non-precision placeholder character "-" and on the right with zeros.
For example:
UT Year | Gregorian |
---|---|
<231,000,000,000 | 123 BC |
<---,---,--8,310 | 13.8 Billion Years Ago (Age of Universe) |
<---,209,152,000 | 251.902 Million Years Ago (Beginning of Triassic) |
A timestamp beginning with ">" indicates a year on or after AD 1. The most significant digit is on the left, the most familiar way for most people. Dates are padded on the left by zeros, and on the right by the non-precision placeholder character, "~".
In ASCII character order, the "-" preceds numbers, where the tilde "" comes after.
Using the "" for a non-precision placeholder in post-meridian years helps maintain
sort order.
For example:
UT Year | Gregorian |
---|---|
>000,000,001,492 | AD 1492 |
>005,~~~,~~~,~~~ | 5 Billion years from now (expected death of the Sun) |
>000,000,000,746 | AD 746 (Fall of the Western Roman Empire) |
Regardless of meridian, the plus character (+) follows the year and denotes the start of the three day digits represnting the date's day of year.
The ~
character is used as a placeholder where precision is unknown.
For example:
Timestamp | Note |
---|---|
>000,000,001,492+013#~~:~~:~~.~~~ | January 13, 1492, Time unknown |
>000,000,001,969+197#13:31:~~.~~~ | July 16, 1969 at 13:31 UTC |
The day, hour, minute, and second segements must contain all digits or all placeholders. This
time segement is invalid: +10~#1~:4~:2~.~~
.
The decimal second segement can have variable precision.
FAQs
A variable precision string sortable timestamp representing billions of years down to millisecons
We found that @uhs/universal-timestamp demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.