Substantial work is being put into a date standard library and formatting currently. There is a stage 1 proposal to rework the date library here: https://github.com/tc39/proposal-temporal. I have a shim for that proposal started here: https://github.com/maggiepint/temporal-shim. I will probably seek stage two for this proposal in November of January. It is quite large, and the shim and spec text take a long time to write, so it can't be moved quickly.
My plan for formatting is to continue to rely on ECMA 402 as we do today. That team has done a wonderful job in the space, and I'm not entirely sure how i could one-up them at this point. As far as why that proposal isn't just the Moment.js library - quite a few reasons. I maintain the Moment.js library with a couple other people, and the moment team actually created the new temporal proposal based on the knowledge of where the library falls down, and where other libraries have succeeded. Some points of difference from moment: Proposal has all immutable data structures Proposal provides a way to represent a date only, time only, and date time without associated time zone APIs in several corners have 'safety' features that Moment doesn't have to prevent developer error - for instance the user must specify a time zone on a zoned object Even after this proposal goes though, I assume there will still be libraries, simply because everyone has different preferences. That said, one should no longer HAVE to bring in a date library for anything as they do today. On Thu, Sep 21, 2017 at 6:41 AM, Matthew Robb <[email protected]> wrote: > I just mean to say that it makes more sense as a userland lib outside of > the context of browsers. > > > - Matthew Robb > > On Thu, Sep 21, 2017 at 9:35 AM, Michael Kriegel < > [email protected]> wrote: > >> Actually I used it in node.js today - where using/deploying another lib >> is less "painful" - agreed. Still I don't think it is browser scope only... >> >> On 21.09.2017 14:59, Matthew Robb wrote: >> >> +1 this sentiment >> >> Raise your hand if you are using Moment.js in projects today? >> Raise your hand if you ship the library wholesale? >> Raise your hand if you use webpack tok strip out the locale files which >> add sig. heft to your bundle? >> >> Moment.js should be standardized... >> >> HOWEVER: The language spec is likely the wrong place. This should >> probably be a browser spec as the biggest motivation is going to be >> localization which I find obnoxious to include in an often shipped defacto >> lib. >> >> >> - Matthew Robb >> >> On Thu, Sep 21, 2017 at 3:17 AM, Michael Kriegel < >> [email protected]> wrote: >> >>> Quoting my initial posting: >>> >>> > I know there are libraries for that, but I think it is fundamental >>> enough to put it into the standard instead. >>> >>> Isn't it legitimate to ask for a defacto-standard to become a real >>> standard... >>> >>> On 21.09.2017 09:13, Bob Myers wrote: >>> >>> There are third-party libraries which are so widely-used as to be >>> defacto standards. >>> Bob >>> >>> On Thu, Sep 21, 2017 at 12:11 PM, Michael Kriegel < >>> [email protected]> wrote: >>> >>>> I would like to suggest to take up date formatting into the standard. >>>> Either as optional format parameter on Date.prototype.toDateString() or as >>>> a separate method Date.prototype.toFormattedDateString(format). >>>> >>>> format should be a string in the form as specified in >>>> https://tc39.github.io/ecma262/#sec-date-time-string-format >>>> >>>> I know there are libraries for that, but I think it is fundamental >>>> enough to put it into the standard instead. >>>> >>>> I hope this was not already discussed before and I just did not find >>>> the thread. >>>> >>>> -- >>>> Michael Kriegel • Head of R&D • Actifsource AG • Haldenstrasse 1 • >>>> CH-6340 Baar • www.actifsource.com • +41 56 250 40 02 >>>> <+41%2056%20250%2040%2002> >>>> >>>> >>>> _______________________________________________ >>>> es-discuss mailing list >>>> [email protected] >>>> https://mail.mozilla.org/listinfo/es-discuss >>>> >>> >>> >>> -- >>> Michael Kriegel • Head of R&D • Actifsource AG • Haldenstrasse 1 • CH-6340 >>> Baar • www.actifsource.com • +41 56 250 40 02 <+41%2056%20250%2040%2002> >>> >>> >>> _______________________________________________ >>> es-discuss mailing list >>> [email protected] >>> https://mail.mozilla.org/listinfo/es-discuss >>> >>> >> >> -- >> Michael Kriegel • Head of R&D • Actifsource AG • Haldenstrasse 1 • CH-6340 >> Baar • www.actifsource.com • +41 56 250 40 02 <+41%2056%20250%2040%2002> >> >> > > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss > >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

