Releases: Louis-Aime/calendrical-javascript
Enhance eraDisplay computation and Gregorian display
- With the Gregorian custom calendar, no era will ever be displayed, event with
eraDisplay
set to 'always'. - In certain circumstances, the array of formatted parts is not the same for different dates (it may be a bug). The Extended DateTomeFormat.format() does not presume that the index for the era part is the same for two different dates.
Reorganise module initialisation
Suppress former dateextendedtest* files.
Suppress aggregate.js, which would only aggregate all modules to a unique exported file. Now each files imports what it needs.
Separate the time units in a time-units.js file, in such a way that Chronos.js is normally not imported from final user, except in order to build new calendars.
The calendrical-init.js file is an example of how to import modules for a non-module .js file (like an HTML page).
Error handling in fetchDOM
If fetchDOM fails, all errors are handled in a similar way, an error message is returned, nothing is written to the console.
Enhance time fields options
If options fields "hour" or "minute" is set to "numeric", separator ":" or "." shall be changed to " h " or " min ". This would work only for ":". However, this "manual" features only works for left-to-right languages, and always with these letters (e.g. event in Russian).
"Historic" calendar displays same eras as built-in "gregory".
When displaying a date of the "historic" calendar, the era is the same as for "gregory".
However, with "eraDisplay" option set to default value, if internal era is AS (Ancient Style), the era AD shall be displayed, whereas if it is NS (New Style), the era shall remain hidden.
This is a simple way to use CLDR values for era and yet distinguish between before and after switching to Gregorian.
ExtDateTimeFormat shall not update options parameter
Upon constructing a new ExtDateTimeFormat object, the options
parameter shall not be changed.
GregorianCalendar custom class conforms to ISO 8601 standard
As of ICU 68, iso8601
built-in calendar does not conform totally to the ISO 8601 standard. Here, the GregorianCalendar class displays years as signed numbers, with a year 0 (year 1 BC/BCE is 0). In the demo, this calendar is named "iso-8601".
`calendar` in ExtDateTimeFormat
Using new ExtDateTimeFormat (locale, options, calendar)
, the calendar
argument used to be a custom calendar only. Now it can be a simple string referring to a built-in calendar.
Enhancements: fix bug in management of week figures and year
Clear distinction between year (as used with DateTimeFormat) and fullYear (unambiguous year). fullYear is a date field like others.
Enhancements: management of week figures
Specify a date from week figures (week year, week number, day of week).
Enhance management of time zone (system or UTC) with Date object.
GitHub reference page is now on main repo.