Skip to content

Conversation

@Khyati-Kapil
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant