-
Notifications
You must be signed in to change notification settings - Fork 311
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
Fix for #1593 added some date tostring options #1596
Conversation
I guess feel free to close this PR |
Thanks for your PR @voronoipotato! Maybe we don't need to close it in full, what's in the PR, only localization? I think it'll be difficult to support Globalization as in .NET because it's quite a big amount of work and that may increase the bundle sizes. For the same reasons, I'd prefer to avoid external dependencies in fable-core (like moment-js), but we can discuss about that. |
I'll reopen for now to see if anything may be useful. I wouldn't say that it was "for" globalization but rather some of the formatting does not take into consideration other cultures. The goal I had in doing this PR was to make copy pasting F# into fable just a little bit easier but I did have concerns about it only being useful for westerners potentially mostly for Americans (I know very little about other cultures). |
I added tostring options with the intention of improving compatibility with Core. I added (f: milliseconds) , (t: AM/PM), dddd Weekdays (english), ddd Weekdays Short (english), mmmm Months (english), mmm Months Short (english), in addition I added several single letter tostring options. d,D,f,F,g,G,m,M,t,T,U . The single letter ToString format for dates exists as a convenience and allows the user to quickly format a date in a useful way. |
Perhaps later we can move all the date stuff into |
That sounds wise ncave. I'll give it a shot. |
a271ca6
to
5fb42f0
Compare
98293a7
to
fc176b6
Compare
765ebd7
to
2d6dc56
Compare
Hi @voronoipotato! What's the status of this? Will you include some tests to see what the PR is trying to solve? Thank you! |
dd1aeb3
to
027307b
Compare
13a9f4e
to
dbf433a
Compare
8c88154
to
e2c26ad
Compare
9f9d44d
to
6ae4cba
Compare
3a9f995
to
e549bb1
Compare
7fe56ba
to
e549bb1
Compare
This isn't needed anymore is it? I am dumb as bricks and missed the ping for a few years now. |
This PR being quite old I think we can close it for now. There is #3692 which tracks the task to improve supported format for DateTime. If someone want to revive it then can either adapt the original mscord code or take inspiration from this PR too. |
Needs some test cases and some testing. I haven't even built fable yet because I've not gotten that far yet but this is where I am right now.