laravel-timezone
laravel-timezone copied to clipboard
Formatting dates
Hello, is it possible to get the format date for each country ? I'm not sure if the APIs return information connected to date format each country.
Interesting question. I'd have to spend some time on google.
@jamesmills Hi, I've found a php class to handle different format dates:
https://www.php.net/manual/en/class.intldateformatter.php
I'll work on it and submit a Pr. Let me work on it
https://stackoverflow.com/questions/44387956/php-get-current-locale-using-timezone
I could very well be an English speaking American visiting Japan, thus my time zone would be Asia/Tokyo even though my local would still be en-US.
Valid point, but it would be great as a default. A member signs up and it detects timezone and date/format and you can change both from there. This would be a great feature!
I was thinking if you get the language from the user it would be a possibility to do it
https://www.w3.org/International/questions/qa-date-format.en#:~:text=Opci%C3%B3n%20uno%3A%20usar%20un%20formato,%2C%202003%2Dabr%2D02.
I've been using this format "Y/M/d g:i a" and the result is 2022/Mar/06 7:10 pm