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

Adds international date formatting #739

Closed
wants to merge 5 commits into
base: master
from

Conversation

Projects
None yet
5 participants
@shutej

shutej commented Oct 26, 2016

No description provided.

@process-bot

This comment has been minimized.

Show comment
Hide comment
@process-bot

process-bot Oct 26, 2016

Thanks for the pull request! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

process-bot commented Oct 26, 2016

Thanks for the pull request! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

@bowsersenior

This comment has been minimized.

Show comment
Hide comment
@bowsersenior

bowsersenior Dec 9, 2016

Please merge this pull request ASAP or similar functionality. Basic UTC support is a requirement for any serious usage. My colleagues will laugh at me if I introduce Elm to them and they find out there is no UTC functionality in it's Time/Date methods.

bowsersenior commented Dec 9, 2016

Please merge this pull request ASAP or similar functionality. Basic UTC support is a requirement for any serious usage. My colleagues will laugh at me if I introduce Elm to them and they find out there is no UTC functionality in it's Time/Date methods.

@lukewestby lukewestby referenced this pull request Jan 20, 2017

Closed

Date #816

2 of 7 tasks complete
@ktonon

This comment has been minimized.

Show comment
Hide comment
@ktonon

ktonon Mar 5, 2017

I agree that timezone support should be part of the core Date library, but until either this PR or #755 get merged, there is http://package.elm-lang.org/packages/elm-community/elm-time/1.0.2/Time-ZonedDateTime

ktonon commented Mar 5, 2017

I agree that timezone support should be part of the core Date library, but until either this PR or #755 get merged, there is http://package.elm-lang.org/packages/elm-community/elm-time/1.0.2/Time-ZonedDateTime

@ktonon ktonon referenced this pull request Mar 5, 2017

Closed

Fix iso8601 timezone #29

@ktonon

This comment has been minimized.

Show comment
Hide comment
@ktonon

ktonon Mar 5, 2017

Actually, I don't think ZonedDateTime will cut it. It doesn't provide a way to get the current datetime! You could just use http://package.elm-lang.org/packages/elm-lang/core/5.1.1/Date#now to get the current date, and then create a ZonedDateTime from that, but then you have no way of knowing what the timezone is in the first place!

ktonon commented Mar 5, 2017

Actually, I don't think ZonedDateTime will cut it. It doesn't provide a way to get the current datetime! You could just use http://package.elm-lang.org/packages/elm-lang/core/5.1.1/Date#now to get the current date, and then create a ZonedDateTime from that, but then you have no way of knowing what the timezone is in the first place!

@ktonon

This comment has been minimized.

Show comment
Hide comment
@ktonon

ktonon Mar 5, 2017

https://github.com/justinmimbs/elm-date-extra/blob/2.0.3/src/Date/Internal/Extract.elm#L55

Shouldn't have to go through this much trouble to get the timezone offset. Package maintainers, please merge, or at least comment on this PR or #755

ktonon commented Mar 5, 2017

https://github.com/justinmimbs/elm-date-extra/blob/2.0.3/src/Date/Internal/Extract.elm#L55

Shouldn't have to go through this much trouble to get the timezone offset. Package maintainers, please merge, or at least comment on this PR or #755

@evancz

This comment has been minimized.

Show comment
Hide comment
@evancz

evancz May 9, 2017

Member

General Comments

I have tried to explain with @process-bot how these sorts of issues are handled. I hope @shutej, @ktonon, and others will read the links in that comment that get into batching work which is elaborated on much more here.

I have also provided this document to help explain some of the near-term prioritization choices.

Specific Comments

Description: To address this issue fully, I would want to review a broad set of usage scenarios to make sure I understood all the possible needs people will have. From there, I would want to review how this is addressed in a bunch of other languages. From there, I would want to find the simplest possible API that is nice to use in practice. This is all hard to do, and as @process-bot says, a PR with a totally blank description does none of this necessary background work.

Design: Getting a UTC offset is an effect, so it likely should be handled as a Task. These API calls just get that info pretending to be a pure function, meaning this could cause test failures depending on where your CI server is running. This seems like a serious concern given than Elm only has managed effects. If the offset is part of the Date, it seems like the conversion from Time needs to take that into account.

Timing: Now, assuming that this PR was great and ready to go, we take releases of elm-lang/core very seriously. Every single library in the whole ecosystem depends on core, so it is important to be thorough. In that spirit, it makes sense to align releases of core with releases of the compiler. That means we get many weeks of testing in real codebases before it goes out to everyone in the ecosystem.

Summary

To take a step back, the big picture prioritization decisions look like this. To actually do a good release of core would take a week of testing at least, meaning a bunch of other stuff gets pushed back even though this could be batched with other testing and basically be free. Expanding the Web Platform support within Elm is already slated as "the next big project" as documented here and would include stuff like this. As I said before, I think the batching approach has been important to Elm's success, and I am very conscious that in spite of the results it has produced, this process does not suit everyone. I think it makes sense to end by reemphasizing this explanation.

I hope this also helps the folks seeing this issue on HN and wondering if there is some broader context. I also hope that it is no surprise that there is.

Member

evancz commented May 9, 2017

General Comments

I have tried to explain with @process-bot how these sorts of issues are handled. I hope @shutej, @ktonon, and others will read the links in that comment that get into batching work which is elaborated on much more here.

I have also provided this document to help explain some of the near-term prioritization choices.

Specific Comments

Description: To address this issue fully, I would want to review a broad set of usage scenarios to make sure I understood all the possible needs people will have. From there, I would want to review how this is addressed in a bunch of other languages. From there, I would want to find the simplest possible API that is nice to use in practice. This is all hard to do, and as @process-bot says, a PR with a totally blank description does none of this necessary background work.

Design: Getting a UTC offset is an effect, so it likely should be handled as a Task. These API calls just get that info pretending to be a pure function, meaning this could cause test failures depending on where your CI server is running. This seems like a serious concern given than Elm only has managed effects. If the offset is part of the Date, it seems like the conversion from Time needs to take that into account.

Timing: Now, assuming that this PR was great and ready to go, we take releases of elm-lang/core very seriously. Every single library in the whole ecosystem depends on core, so it is important to be thorough. In that spirit, it makes sense to align releases of core with releases of the compiler. That means we get many weeks of testing in real codebases before it goes out to everyone in the ecosystem.

Summary

To take a step back, the big picture prioritization decisions look like this. To actually do a good release of core would take a week of testing at least, meaning a bunch of other stuff gets pushed back even though this could be batched with other testing and basically be free. Expanding the Web Platform support within Elm is already slated as "the next big project" as documented here and would include stuff like this. As I said before, I think the batching approach has been important to Elm's success, and I am very conscious that in spite of the results it has produced, this process does not suit everyone. I think it makes sense to end by reemphasizing this explanation.

I hope this also helps the folks seeing this issue on HN and wondering if there is some broader context. I also hope that it is no surprise that there is.

@elm elm locked and limited conversation to collaborators May 9, 2017

@evancz

This comment has been minimized.

Show comment
Hide comment
@evancz

evancz Jul 8, 2017

Member

As I have learned more about producing accurate date information, it seems like it is worth trying to make something like elm-community/elm-time as solid and nice to use as possible. I do not have faith that we can build on top of JavaScript's Date functions and build anything particularly nice.

Member

evancz commented Jul 8, 2017

As I have learned more about producing accurate date information, it seems like it is worth trying to make something like elm-community/elm-time as solid and nice to use as possible. I do not have faith that we can build on top of JavaScript's Date functions and build anything particularly nice.

@evancz evancz closed this Jul 8, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.