Skip to content

Releases: phensley/cldr-engine

v1.2.3

12 Jan 20:28
Compare
Choose a tag to compare

Added

v1.2.2

20 Jul 17:29
Compare
Choose a tag to compare

Added

  • The phensley/timezone package includes a new TZ.zoneMeta method to return metadata for a timezone. This can be useful for displaying user interfaces for choosing a timezone. The new properties are:

    • stdoffset - Current standard offset, in milliseconds.
    • latitude - Latitude to 6 decimal places, for the timezone's "principal location"
    • longitude - Latitude to 6 decimal places, for the timezone's "principal location"
    • countries - List of ISO 3166 2-letter country codes for countries which overlap the timezone.
  • The cldr.Calendars.timeZoneInfo result TimeZoneInfo now includes the same properties as TZ.zoneMeta above, plus the following property:

v1.2.1

18 Jun 20:21
Compare
Choose a tag to compare

Fixed/Changed

  • Use tslib ^1.13.0

v1.2.0

28 Apr 19:44
Compare
Choose a tag to compare

Fixed/Changed

  • Project now uses standard semantic versioning, see README
  • All @phensley/* package interdependencies now use the ^x.x.x constraint.
  • Removed the internal package @phensley/cldr-schema, merging its code into @phensley/cldr-core.
  • Switched from tslint to eslint.
  • Modified checksum so that resource packs are now compatible at the patch level. Resource packs must match the major.minor version of the @phensley/cldr-core package at runtime to ensure schema compatibility.

v1.1.2

27 Apr 14:30
Compare
Choose a tag to compare

Added

  • Upgrade to tzdb 2020a
  • CLDR.Numbers.parseDecimal convenience method to parse a number or string into a Decimal instance.
  • CLDR.Calendars.timeZoneFromUTC and CLDR.Calendars.timeZoneFromWall convenience methods to lookup time zone info from either a UTC or local "wall clock" timestamp.

v1.1.1

20 Apr 16:58
Compare
Choose a tag to compare

Added

  • Currency formatting can now use the trimZeroFractions option to format an amount as a whole number when the fractional digits are all zero. With this option 10.00 formats as "$10", but 10.10 would still format as "$10.10". This option has no effect if the minimumFractionDigits option is also set.

v1.1.0

15 Apr 20:06
Compare
Choose a tag to compare

Added

  • Upgrade to CLDR v37
  • New methods to construct dates from one or more fields, e.g. Calendars.newGregorianDate(fields) for each calendar type.
  • New methods to construct "now" dates, e.g. Calendars.now() and Calendars.nowGregorian() for each calendar type.
  • CalendarDate.asJSDate() converts a CalendarDate to a JavaScript Date.
  • CalendarDate.set(fields) to set one or more fields on a date.
  • CalendarDate.fields() returns a TimePeriod populated with a date's field values.
  • CalendarDate.toISOString() returns an Gregorian ISO-8601 string of the UTC timestamp.
  • CalendarDate.toLocalISOString() returns an Gregorian ISO-8601 string of the local timestamp.
  • Calendars.formatDateWrapper() method to wrap a date and time that have been formatted separately. Can be used to join a relative date format with a time, e.g. "Next Wednesday at 3:30 PM".
  • CalendarDate.differenceSigned() method to return signed values (.difference() returns absolute value).
  • Timezone records can now be queried using local "wall clock" time.
  • Date formatting options now accept an optional alt property:
    • The era default for Gregorian is "Before Christ" and "Anno Domini".
      Specifying the { alt: { era: 'sensitive' }} option will use "Before Common Era" and "Common Era".
    • The dayPeriod default for Gregorian in US English is "AM" and "PM".
      Specifying the { alt: { dayPeriod: 'casing' }} option will use lowercase forms "am" and "pm".
  • Expose the Calendars.firstDayOfWeek() and Calendars.minDaysInFirstWeek() methods.

Breaking Changes

  • The following values of UnitType have been renamed in the underlying CLDR data.

    old new
    meter-per-second-squared meter-per-square-second
    part-per-million permillion
    liter-per-100kilometers liter-per-100-kilometer
    millimeter-of-mercury millimeter-ofhg
    pound-per-square-inch pound-force-per-square-inch
    inch-hg inch-ofhg
    pound-foot pound-force-foot

Fixed/Changed

  • TimePeriod fields are no longer optional, and CalendarDate.add and .subtract now take a Partial<TimePeriod> to allow fields to be omitted.
  • CalendarDate.toString now formats the era-less extended year for consistency.
  • Internal: generalized the vector arrow type in the schema, to support creation of higher-dimension arrows while reducing runtime code size.

v1.0.9

19 Mar 00:53
Compare
Choose a tag to compare

Added

  • Added readmes for several packages.

Fixed/Changed

  • Fix unnecessary dependencies on @phensley/cldr-types package.
  • Upgrade all regular and development dependencies.

v1.0.8

19 Mar 00:52
Compare
Choose a tag to compare
  • Broken release.

v1.0.7

19 Mar 00:52
Compare
Choose a tag to compare

Fixed/Changed

  • Improve defaulting for number formatting minimum integer options.
  • Fix defaulting to non-latn number systems for compact number formats.
  • Fix rare decimal division rounding bug caused by a leading zero on remainder.
  • Test coverage increased to 100% of all branches.