-
Notifications
You must be signed in to change notification settings - Fork 738
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement localized week information (#1454)
* begin adding support for locale-dependent start of week * Use an options parameter for locale week startOf * Add tests for locale week start and end * Add useLocaleWeeks option to DateTime.hasSame and add tests * Add useLocaleWeeks option to Interval.count * Add Intl.Locale.weekInfo as a reported optional feature and test for it * Add Info.getStartOfWeek method * Add DateTime.isWeekend and DateTime.localDayOfWeek getters * Improve localized week code in DateTime#startOf * Implement DateTime#localWeekYear and DateTime#localWeekNumber Adjust localWeekDay to be in line with weekday * Add documentatino for DateTime#localWeekNumber and DateTime#localWeekYear * Add Info.getMinimumDaysInFirstWeek and Info.getWeekendWeekdays and tests * Add DateTime#isWeekend test * Add tests for DateTime#localWeekNumber and localWeekYear * Add tests for localWeekday * Add formatting tokens for localWeekYear and localWeekNumber * Add tests for formatting tokens n, nn, ii, iiii * Implement DateTime#weeksInLocalWeekYear and proper week year length calculations based on locale week settings * Support setting locale based week units with `DateTime#set` * Fix Typo * Add tests for DateTime#set with locale based week units and DateTime#weeksInLocalWeekYear * Accept locale-based week units in DateTime#fromObject * Add Settings.defaultWeekSettings * Add documentation for locale-based weeks * Remove unused value from usesLocalWeekValues * Remove incorrect claim in documentation * Remove dumb import
- Loading branch information
1 parent
5ea19fb
commit 1b8679e
Showing
18 changed files
with
1,031 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.