Skip to content
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

Formatting dates #81

Open
quevlu opened this issue Feb 15, 2022 · 7 comments
Open

Formatting dates #81

quevlu opened this issue Feb 15, 2022 · 7 comments

Comments

@quevlu
Copy link

quevlu commented Feb 15, 2022

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.

@jamesmills
Copy link
Owner

Interesting question. I'd have to spend some time on google.

@quevlu
Copy link
Author

quevlu commented Mar 5, 2022

@jamesmills Hi, I've found a php class to handle different format dates:

https://www.php.net/manual/en/class.intldateformatter.php

@quevlu
Copy link
Author

quevlu commented Mar 5, 2022

I'll work on it and submit a Pr. Let me work on it

@quevlu
Copy link
Author

quevlu commented Mar 6, 2022

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.

@seabasss
Copy link

seabasss commented Mar 6, 2022

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!

@quevlu
Copy link
Author

quevlu commented Mar 6, 2022

I was thinking if you get the language from the user it would be a possibility to do it

@quevlu
Copy link
Author

quevlu commented Mar 6, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants