Skip to content

Releases: Louis-Aime/calendrical-javascript

Enhance eraDisplay computation and Gregorian display

13 Aug 21:23
Compare
Choose a tag to compare
  1. With the Gregorian custom calendar, no era will ever be displayed, event with eraDisplay set to 'always'.
  2. 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

13 Aug 15:18
Compare
Choose a tag to compare

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

11 Aug 15:04
Compare
Choose a tag to compare

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

07 Aug 14:18
Compare
Choose a tag to compare

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".

06 Aug 14:14
Compare
Choose a tag to compare

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

06 Aug 12:37
Compare
Choose a tag to compare

Upon constructing a new ExtDateTimeFormat object, the options parameter shall not be changed.

GregorianCalendar custom class conforms to ISO 8601 standard

04 Aug 08:03
9ad2f68
Compare
Choose a tag to compare

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

28 Jul 21:35
066165f
Compare
Choose a tag to compare

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

20 Jul 13:45
Compare
Choose a tag to compare

Clear distinction between year (as used with DateTimeFormat) and fullYear (unambiguous year). fullYear is a date field like others.

Enhancements: management of week figures

16 Jul 22:00
Compare
Choose a tag to compare

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.