dayjs
dayjs copied to clipboard
Fixed Incorrect parsing of timestamp passing as string
fix(parse): correctly parse numeric string timestamps as timestamps
Previously, dayjs("1762232987879") would attempt to parse the string as a date format, resulting in an incorrect negative timestam and wrong date formatting. This occurred because the regex for date parsing matched the string before checking if it was a numeric timestamp.
Now, numeric string timestamps are checked and parsed as timestamps before attempting date string parsing.
This fix resolves issues with isBefore, isAfter, and formatting methods when using numeric string inputs.