Suggestions for v2.0
See original GitHub issueThese are ideas for potential breaking changes that could be introduced in v2.0, all open for discussion.
Settings.setDefaultZoneinstead ofSettings.defaultZonesetter since input type differs from getter- IANAZone constructor made private, use
create()instead to benefit from the cache - Rename
Zone.universaltoisUniversal - New
DateTime.now()method equivalent tolocalwith no parameter - Rename
options.setZonetokeepZoneinDateTimeconstructors’ options - Add a new
DateTime.plus/minus(12, 'hours')method - Deprecate
plus/minus(ms), i.e. a number parameter which has no obvious meaning when reading the code - In
DateTime,resolvedLocaleOpts,toLocaleStringandtoLocalePartsall accept anoptionsparameter which is a union ofLocaleOptions(i.e.{ locale, outputCalendar, numberingSystem }already used inreconfigureandtoFormat) andIntl.DateTimeFormatOptions. These could be split into two options parameters instead, each with a different role DateTime::resolvedLocaleOptsreturns an{ locale, outputCalendar, numberingSystem }object, whereasIntl.ResolvedDateTimeFormatOptionsreturns{ locale, calendar, numberingSystem (and more) }.outputCalendarcould be renamed tocalendarinstead to be more consistent.- Rename
DateTime::resolvedLocaleOptstoresolvedLocaleOptions DateTime.toSecondsreturns an integer value (see #565), so that it can be used in Unix timestamps creation, and can otherwise be replaced bytoMillis() / 1000
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:12 (7 by maintainers)
Top Results From Across the Web
Suggestions v2.0 - Superhero Database
Suggestions v2.0. Created by Galactus, 3 y 4 mo 25 d ago. Suggest new features or feature updates for the website. Current Features...
Read more >Suggestions v2.0 | Fandom - Phantom Forces Wiki
Chauchat (A troll light machine gun, with a slow fire rate of ~240 RPM, but comes with a high damage output of 60-46,...
Read more >Suggestions Thread for v2.0 - Aurora 4x
Re: Suggestions Thread for v2.0 ... I know that Aurora is heavily leaning toward a strategic/tactical game. But I would love to see...
Read more >Suggestions and feedback on v2.0 rules, plus some extra tips ...
GeekGold Bonus for All Supporters at year's end: 1000! 16 Days Left. $15 min for supporter badge & GeekGold bonus. Support ...
Read more >Suggestions for the v2.0 Cog Task... : r/Toontown - Reddit
Add v2.0 Cog Summons as special rewards for defeating the CJ. · Make v2.0 Cogs rarely spawn anywhere from streets to buildings to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Thoughts:
2 I though this came from the 2.0 branch. I cannot remember why I did it in my branch, although it seems reasonable. I think all I did was to update the tests (24 occurrences) to use
createinstead ofnew5 I agree the name should be more explicit. The impact of an
undefinedzone is also not obvious. The examples should show the results of these different options6 Since I believe 90% of the case apply a single unit, this version seems more readable as an English sentence. At least that’s what I wrote first before looking at the documentation.
9 makes sense
11
toUnixfeels too specific, and the timestamp precision seems to depend on the file system. What aboutasSeconds, which indicates a conversion?toSecondscould be deprecated to reduce the footprint.I’ve opened a PR to add another function for whole number unix timestamps, it uses the same Math.floor method as Moment.
#1114