question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

parseDate error from recent release.

See original GitHub issue

Describe the bug from https://github.com/iamkun/dayjs/pull/969

// v1.8.30
export var REGEX_PARSE = /^(\d{4})-?(\d{1,2})-?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?.?(\d{1,3})?$/;


// v1.8.31
export var REGEX_PARSE = /^(\d{4})-?(\d{1,2})?-?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?.?(\d{1,3})?$/;

result: image

// v1.8.31
dayjs('2020/9/30').format(); // result: 2020-01-01T09:00:00+08:00

Expected behavior

// v1.8.30
dayjs('2020/9/30').format(); // result: 2020-09-30T00:00:00+08:00

Information

  • Day.js Version [e.g. v1.8.31]

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
dyoshikawacommented, Aug 3, 2020

I’m sorry the new bug. Thank you for reporting and fixing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error 'failed to parse date' for Date Time Field with Data Loader
Error converting value to correct data type: Failed to parse date: 1999-01-01T23:01:01+01:00. Resolution. Although the Data Loader relies on ...
Read more >
'Unable to parse date' Error Passing Dates to UCM Metadata ...
An error occurs when using Dates in UCM Archive Metadata. When configuring Document Factory to add custom fields to the metadata when Archiving ......
Read more >
parseDate - Amazon QuickSight
parseDate parses a string to determine if it contains a date value, and returns a standard date in the format yyyy-MM-ddTkk:mm:ss.
Read more >
Could not parse date in RESTful application with Jersey
The problem here is that the format used on the server to deserialize a date does not match the format you used in...
Read more >
PARSEDATE Function - Trifacta Documentation
If you are having difficulties with execution of the PARSEDATE function, you can try to set your locale settings to U.S. to fix...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found