You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have a situation where I want to compare and evaluate user input. The user input can either be a date string or a number. In the resolvement function, I wanted to avert checking the variable type and just parse the input into a date and check whether this parsed date is valid. This works perfectly fine except for numbers between 10 and 24.
Actual vs Expected behavior
I would expect the function to either work with arbitrary numbers or with no numbers at all. This behaviour seems inconsistent.
Browser [e.g. Chrome 84, safari 14.0]
Luxon version: latest
Additional context
This is more a question than a bug report to be honest. If this behaviour is intended, I am totally fine with it. However, I am primarily wondering why it only works for integers from 10 to 24. I assume/understand that is has something todo with some time offset and I would understand every number larger than 24 not working. However, it still puzzles me that single digit numbers also seem to be a problem. Is there any particular reason behind this?
The text was updated successfully, but these errors were encountered:
Describe the bug
I have a situation where I want to compare and evaluate user input. The user input can either be a date string or a number. In the resolvement function, I wanted to avert checking the variable type and just parse the input into a date and check whether this parsed date is valid. This works perfectly fine except for numbers between 10 and 24.
To Reproduce
CodeSandbox
Actual vs Expected behavior
I would expect the function to either work with arbitrary numbers or with no numbers at all. This behaviour seems inconsistent.
Additional context
This is more a question than a bug report to be honest. If this behaviour is intended, I am totally fine with it. However, I am primarily wondering why it only works for integers from 10 to 24. I assume/understand that is has something todo with some time offset and I would understand every number larger than 24 not working. However, it still puzzles me that single digit numbers also seem to be a problem. Is there any particular reason behind this?
The text was updated successfully, but these errors were encountered: