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.

No error raised on invalid dates

See original GitHub issue

It seems like an error should be thrown on invalid dates, but this doesn’t appear to happen. Is there some parameter I need to pass in to the get() function to enforce these are checked properly?

Using v0.12.1:

In [21]: import arrow

In [22]: arrow.get('2/30/2018')
Out[22]: <Arrow [2018-01-01T00:00:00+00:00]>

In [23]: arrow.get('13/4/2045')
Out[23]: <Arrow [2045-01-01T00:00:00+00:00]>

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:5

github_iconTop GitHub Comments

1reaction
Luca409commented, Apr 5, 2018

I would count dates in the format “MM/DD/YYYY” as invalid for now.

0reactions
akatchacommented, Apr 9, 2018

@Luca409 @ryantuck I have submitted a pull request for this issue here: #527 Feel free to give it a review!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is the expected exception not thrown on parsing invalid ...
This question already has answers here:​​ I get two strings and I must transform them into dates and show the difference in days...
Read more >
10 Handling PL/SQL Errors
For example, PL/SQL raises the predefined exception NO_DATA_FOUND if a SELECT INTO statement returns no rows. You can use the pragma EXCEPTION_INIT to...
Read more >
Exception condition "Date invalid" raised - SAP Community
Hello Experts,. While releasing thedata for a particular material from APO to ECC, the queues are seen jammed in /SAPAPO/CQ & showing the ......
Read more >
Timex parsing invalid dates and the db is blowing up
But my little logic does not catch that and timex seems to parse it all ... (exit) an exception was raised: ** (ErlangError)...
Read more >
Date::Error exception when viewing audit logs for an invalid date
No tasks are currently assigned. Use tasks to break down this issue into smaller parts. Linked items. 0.
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