-
-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parse() cannot parse a time string like this: 2022-5-18 #131
Comments
"2020-8-05" is not a standard time format, you can use carbon.ParseByLayout("2020-8-05", "2006-1-02") or carbon.ParseByFormat("2020-8-05", "Y-n-d") |
However, such analysis is not feasible for data sources that are not uniform or standardized, such as:
Is it possible to use string splitting to unify the non-standard input into the canonical one, so that we do not need to care too much about the format of the input, as long as it is a normal time format, not too canonical. |
If possible, consider these non-standard formats. |
Already under development, the next version will be compatible |
It has been fixed in 1.7.0 or 2.2.0 |
The Parse() method cannot parse a time string when the month or date less than 10 is not preceded by 0, like this:
2022-5-18
Code sample:
Do need to support this less formal time format string, thank you!
The text was updated successfully, but these errors were encountered: