Skip to content

Latest commit

 

History

History
348 lines (308 loc) · 11.7 KB

CHANGELOG.md

File metadata and controls

348 lines (308 loc) · 11.7 KB

Changelog

Strictly follows Semantic Versioning 2.0.0.

v1.16.1

2024-09-17

🐛 Bug fixes:

🔧 Internal:

  • TypeScript upgrade 5.5.2 -> 5.6.2

v1.16.0

2024-06-26

🚀 Features:

  {
    alpha3Code: "ZWG", // NEW
    currencyName: "Zimbabwe Gold", // NEW
    numericCode: 924, // NEW
    minorUnit: 2, // NEW
    introducedIn: "2024-06-25" // NEW
  },
  {
    alpha3Code: "ZWL",
    currencyName: "Zimbabwe Dollar",
    numericCode: 932,
    minorUnit: 2,
    historicalFrom: "2024-09-01" // CHANGED (before: undefined)
  }

🔧 Internal:

  • TypeScript upgrade 5.4.5 -> 5.5.2

v1.15.0

2024-05-10

🚀 Features:

  • TypeScript 5.4.x support
// before
export type Locale = Intl.BCP47LanguageTag | Intl.BCP47LanguageTag[]; // TS 5.3.x
// new:
export type Locale = Intl.LocalesArgument; // TS 5.4.x

🔧 Internal:

  • TypeScript upgrade 5.3.2 -> 5.4.5

v1.14.0

2023-12-11

🚀 Features:

  {
    alpha3Code: "ANG",
    currencyName: "Netherlands Antillean Guilder",
    numericCode: 532,
    minorUnit: 2,
    historicalFrom: "2025-03-31" // CHANGED (before: undefined)
  },
  // ... other currencies
  {
    alpha3Code: "XCG", // NEW
    currencyName: "Caribbean Guilder", // NEW
    numericCode: 532, // NEW
    minorUnit: 2, // NEW
    introducedIn: "2025-03-31" // NEW
  },

v1.13.0

2023-02-21

🚀 Features:

findIso4217CurrencyForIso3166Country(code: Iso3166Alpha2Code | Iso3166Alpha3Code | Iso3166NumericCode): Iso4217Currency | undefined

📄 Documentation:

v1.12.0

2022-12-22

🚀 Features:

{
  countryName: "Türkiye",
  officialStateName: "The Republic of Türkiye",
  alpha2Code: "TR",
  alpha3Code: "TUR",
  numericCode: 792
}
  • getIso4217Currencies() - from 2023-01-01 Kuna currency (HRK) will be treated as historical because Croatia joins the euro. New argument statusForTheDay has been introduced. When statusForTheDay is defined then only valid (non-historical) currencies are returned. statusForTheDay = undefined means today (new Date()). Iso4217Currency has two new optional properties: historicalFrom?: DateIsoString, introducedIn?: DateIsoString (for future use).
getIso4217Currencies(statusForTheDay?: Date | DateIsoString): Iso4217Currency[]

interface Iso4217Currency {
  // ... old properties
  historicalFrom?: DateIsoString; // e.g. "2023-01-01"
  introducedIn?: DateIsoString;
}

🔧 Internal:

  • TypeScript upgrade 4.7.2 -> 4.9.4

v1.11.0

2022-10-24

🚀 Features:

  • formatNumber() - new overload, accepts NumberFormatIntl options, that can be created using createNumberFormat(). This new overload is dedicated when formatting is used many times (thousands, e.g. big tables with financial data). The source of the problems is creating new Intl.NumberFormat, which is expensive. Using createNumberFormat() it can be created only once and re-used.
const options = createNumberFormat({ thousandsSeparator: false }, "de");
formatNumber(12486.4, options);
formatNumber(100, options);

🔧 Internal:

  • renamed createDateFormat() -> createDateFormatIntlObj()
  • renamed createNumberFormat() -> createNumberFormatIntlObj()

📄 Documentation:

v1.10.0

2022-10-06

🚀 Features:

formatMoney(1.532, { precision: 2, currency: 840 }, "pl-PL")
formatMoney(-1.532, { precision: 2, currency: 840, currencySign: "accounting" })
getCurrencySymbol({ currency: "CAD", currencyDisplay: "narrowSymbol" }, "en")

v1.9.0

2022-10-05

🚀 Features:

{ currency: "USD", currencyDisplay: "code" }

v1.8.0

2022-10-04

🚀 Features:

getCurrencySymbol(): string

💡 Enhancements:

🔧 Internal:

  • TypeScript upgrade 4.7.2 -> 4.8.4

v1.7.0

2022-05-27

🚀 Features:

getIso4217Currencies(): Iso4217Currency[]
findIso4217Currency(code: Iso4217Alpha3Code | Iso4217NumericCode): Iso4217Currency | undefined
isValidIso4217Code(code: Iso4217Alpha3Code | Iso4217NumericCode): boolean
formatCurrency(currency: Iso4217Alpha3Code | Iso4217NumericCode, locale?: Locale): string

💡 Enhancements:

  • formatCountry() - ensured that invalid country code is handled without throwing an error (this case was previously undocumented); for invalid string code the same string is returned, but for invalid numeric code empty string is returned

v1.6.0

2022-05-25

🚀 Features:

getCountryCodeFromBic(bic: string): Iso3166Alpha2Code | "XK" | undefined
getCountryCodeFromIban(iban: string): Iso3166Alpha2Code | "XK" | undefined

🔧 Internal:

  • TypeScript upgrade 4.6.4 -> 4.7.2

v1.5.0

2022-05-22

🚀 Features:

roundUsingHalfAwayFromZero(value: number, precision: number): number
formatNumber(-0.001, { maxPrecision: 2, negativeZero: false }, "en-US"); // returns "0" instead of "-0"

💡 Enhancements:

  • roundUsingBankersMethod() - improved precision argument validation (RangeError is thrown for precision < 0 or equal to NaN)
  • roundUsingBankersMethod() - precision value is converted using Math.trunc to ensure that the value is an integer (without throwing an error)

v1.4.0

2022-04-25

🚀 Features:

formatMonth(month: number, monthFormat: MonthFormat, locale?: Locale): string
formatMonth(date: Date | DateIsoString, monthFormat: MonthFormat, locale?: Locale): string

v1.3.0

2022-03-03

🚀 Features:

formatNumberToFixed(value: number, precision?: number, locale?: Locale): string

🔧 Internal:

  • TypeScript upgrade 4.5.2 -> 4.6.2

v1.2.0

2021-11-22

🚀 Features:

formatCountry(country: Iso3166Alpha2Code | Iso3166Alpha3Code | Iso3166NumericCode, locale?: Locale): string

🔧 Internal:

  • deprecated function substr() has been replaced by substring()

v1.1.0

2021-11-19

🚀 Features:

getStatesOfUsa(): StateOfUsa[]

v1.0.0

2021-04-27

Exactly the same as v0.4.0 but major version was set to 1. The reason is to follow Semantic Versioning 2.0.0. for public, stable API.

v0.4.0

2021-04-27

🚀 Features:

v0.3.0

2021-04-26

🚀 Features:

v0.2.0

2021-04-20

🚀 Features:

💡 Enhancements:

v0.1.0

2021-04-13

Initial public release.

🚀 Features:

  • capitalizeFirstLetter()
  • compareBooleans()
  • compareDates()
  • compareNumbers()
  • compareNumbersAlike()
  • compareStrings()
  • compareStringsFactory()
  • formatDate()
  • formatDateToISO()
  • formatIban()
  • formatInteger()
  • formatMoney()
  • formatNumber()
  • formatNumberToFixed()
  • formatRelativeTime()
  • formatString()
  • formatTime()
  • getDateFnsFormat()
  • getDecimalSeparator()
  • getMinusSign()
  • getMomentFormat()
  • getSystemLocaleName()
  • getThousandsSeparator()
  • lowercaseFirstLetter()
  • normalizeForSearching()
  • parseNumber()
  • plural()
  • roundUsingBankersMethod()
  • sort()
  • sortBy()
  • sortByInplace()
  • sortInplace()
  • transformToInputNumericString()