V3 spec (IMPORT ONLY)

This commit is contained in:
Cohee
2024-06-01 22:07:57 +03:00
parent 2e23e78937
commit b559f2f559
5 changed files with 80 additions and 23 deletions

View File

@ -633,6 +633,9 @@ function parseTimestamp(timestamp) {
// Unix time (legacy TAI / tags)
if (typeof timestamp === 'number') {
if (isNaN(timestamp) || !isFinite(timestamp) || timestamp < 0) {
return moment.invalid();
}
return moment(timestamp);
}