Releases: phensley/cldr-engine
Releases · phensley/cldr-engine
v1.2.3
Added
- Upgrade to tzdb 2020f
v1.2.2
Added
-
The
phensley/timezone
package includes a newTZ.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
resultTimeZoneInfo
now includes the same properties asTZ.zoneMeta
above, plus the following property:metazone
Current CLDR metazone for the timezone.
v1.2.1
v1.2.0
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
Added
- Upgrade to tzdb 2020a
CLDR.Numbers.parseDecimal
convenience method to parse a number or string into aDecimal
instance.CLDR.Calendars.timeZoneFromUTC
andCLDR.Calendars.timeZoneFromWall
convenience methods to lookup time zone info from either a UTC or local "wall clock" timestamp.
v1.1.1
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 option10.00
formats as"$10"
, but10.10
would still format as"$10.10"
. This option has no effect if theminimumFractionDigits
option is also set.
v1.1.0
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()
andCalendars.nowGregorian()
for each calendar type. CalendarDate.asJSDate()
converts aCalendarDate
to a JavaScriptDate
.CalendarDate.set(fields)
to set one or more fields on a date.CalendarDate.fields()
returns aTimePeriod
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".
- The
- Expose the
Calendars.firstDayOfWeek()
andCalendars.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, andCalendarDate.add
and.subtract
now take aPartial<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
v1.0.8
v1.0.7
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.