Merge branch 'staging' into smol-tag-improvements

This commit is contained in:
Wolfsblvt
2024-06-10 01:45:15 +02:00
15 changed files with 640 additions and 57 deletions

View File

@ -654,11 +654,11 @@ function parseTimestamp(timestamp) {
}
// Unix time (legacy TAI / tags)
if (typeof timestamp === 'number') {
if (typeof timestamp === 'number' || /^\d+$/.test(timestamp)) {
if (isNaN(timestamp) || !isFinite(timestamp) || timestamp < 0) {
return moment.invalid();
}
return moment(timestamp);
return moment(Number(timestamp));
}
// ST "humanized" format pattern