-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Localization of parsing format (parse, constructor...) #1074
Comments
Hey, Sorry but I didn't really get your question. What are you trying to accomplish really? I'm asking this because you can set a format on the Enlighten me please :P Thank you. |
Thanks for at least trying to understand. It could be great addition if we had a static parseFromFormat string to avoid using createFromFormat and using the constructor like Laravel do. My input are like dd/mm/YYYY If I could set my parseFromFormat like this : createFromFormat works great and I’m using right now as a tweak and it’s a bit overwhelming because I have to do it for each user date input... I tried many solutions and none are elegant. I really think it can be a great feature for both of us : Carbon, Laravel and other weird date formats :) Thanks |
Sorry, still don't get it. Please add code, or the code you wish and the output you expect. |
Have to do what, could you provide code please? I close this issue for the moment. If you provide concrete code and expected result, I'll re-open it. |
Hey,
First of all, carbon is awesome! Great work folks!
I’m working with Laravel and managing dates in French can be such a pain in the #$%.
Indeed, when I'm trying to get my date from a browser request, I need to convert it (submit interception) in order to be parsed by Carbon. For this, I chose a common format (ISO 8601) for JS and PHP, which is fine.
I could avoid such tweak if I could set the “From Format” like specified in createFromFormat().
Today, we can set the “TO” format and i think it could be a really great improvement if we could do so.
Thanks
The text was updated successfully, but these errors were encountered: