{"action":"closed","issue":{"url":"https://api.github.com/repos/tc39/proposals/issues/15","repository_url":"https://api.github.com/repos/tc39/proposals","labels_url":"https://api.github.com/repos/tc39/proposals/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/tc39/proposals/issues/15/comments","events_url":"https://api.github.com/repos/tc39/proposals/issues/15/events","html_url":"https://github.com/tc39/proposals/issues/15","id":171101380,"number":15,"title":"A fresh look at date-time and timezone logic.","user":{"login":"tracker1","id":444316,"avatar_url":"https://avatars.githubusercontent.com/u/444316?v=3","gravatar_id":"","url":"https://api.github.com/users/tracker1","html_url":"https://github.com/tracker1","followers_url":"https://api.github.com/users/tracker1/followers","following_url":"https://api.github.com/users/tracker1/following{/other_user}","gists_url":"https://api.github.com/users/tracker1/gists{/gist_id}","starred_url":"https://api.github.com/users/tracker1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tracker1/subscriptions","organizations_url":"https://api.github.com/users/tracker1/orgs","repos_url":"https://api.github.com/users/tracker1/repos","events_url":"https://api.github.com/users/tracker1/events{/privacy}","received_events_url":"https://api.github.com/users/tracker1/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-15T03:15:59Z","updated_at":"2016-08-15T03:39:47Z","closed_at":"2016-08-15T03:39:47Z","body":"Given the massive works that have been done to improve and enhance the language, it's time to give timezone and date-time logic an updated approach.  I'm not sure where to even start with this, but I was thinking it might be nice to get something similar to `moment.js` + `moment-timezone` inside JavaScript proper...  perhaps `Moment` to correspond to `Date` with a nod to the library.\r\n\r\nI'm not suggesting it follow the moment library completely, but it might be a nice place to consider...  An alternative may be more additions to `Date` but I'm not sure that it's a good idea.   I'd also suggest that some minimal formats are accepted, and some behaviors established.\r\n\r\n* Symbol constants for parts of time (`Moment.DAYS`, `Moment.MONTHS`, ...) in code, used for Date-time math... ex: `someMoment.add(5, Moment.DAYS)`\r\n* Immutable by default, any method should return a new instance not mutate the underlying value.\r\n* Timezone support, this is crucial, and I know it's *huge* to polyfill, so would be essential to getting browser vendors on board.\r\n* `.toZone(timezoneId = localZone)` - instance from one timezone to another, with time adjustment\r\n* `.asZone(timezoneId = localZone)` - instance zone changed to another, without time adjustment\r\n*`.format(formatString)` - string formatting, including localization constructs/convensions\r\n* parsing strings, ISO-8601 format must be used, or a specific format string must be specified, UTC is default unless a zone is specified as part of the string, can use toZone/asZone to make a local time instance.\r\n\r\nWork with the moment.js team to create a new version as a polyfill that aligns with the proposed design, I know that there's been talk about going immutable in particular, and there's been a lot of good work there.\r\n"}}
{"actor":{"display_login":"ljharb"}}