Getting started
Changelog
What changed in each version of the spec, the behaviour every package implements.
Each entry is a spec version: the rules, data and test vectors every package implements. Package releases (npm, Packagist) follow it and list their own changes in their CHANGELOG.md. See Versioning for what each kind of number means.
Breaking marks an output that changes for an input that worked before.
0.14.0 (2026-11-30)
Section titled “0.14.0 (2026-11-30)”ariary: New optiongrouping: 'none': no thousands separator.formatAriary(1500.5, { grouping: 'none' })→Ar 1500,5; reading then accepts only digits and one decimal mark, so1 500isINVALID_FORMAT. The defaults do not change.
0.13.0 (2026-11-29)
Section titled “0.13.0 (2026-11-29)”date-time: Breaking:spellTimeandspellDateTimecount every minute withminitra:14:30→amin'ny roa sy telopolo minitra tolakandro(wassy sasany),17:45→amin'ny dimy sy dimy amby efapolo minitra tolakandro(wasenina latsaka fahefany hariva). Parts of the day:alina0–3 and 20–23,maraina4–11,atoandro12,tolakandro13–17,hariva18–19.parseTimereads only this spelling.
0.12.0 (2026-11-29)
Section titled “0.12.0 (2026-11-29)”- Breaking: every package has a name that says what it does. No behaviour changes; functions, classes and methods keep their names.
| Before | Now |
|---|---|
npm @mdgascar/utils |
@mdgascar/malagasy-intl |
npm @mdgascar/words, @mdgascar/phone, @mdgascar/date |
@mdgascar/number-words, @mdgascar/phone-number, @mdgascar/date-time |
Composer mdgascar/mdg-utils |
mdgascar/malagasy-intl |
Composer mdgascar/mdg-utils-laravel |
mdgascar/malagasy-intl-laravel |
Composer mdgascar/mdg-utils-bundle |
mdgascar/malagasy-intl-symfony |
PHP Mdgascar\MdgUtils\Words, Phone, Date |
Mdgascar\MalagasyIntl\NumberWords, PhoneNumber, DateTime |
MdgError, MdgUtilsException |
MalagasyIntlError, MalagasyIntlException |
modules words, phone, date |
number-words, phone-number, date-time |
0.11.0 (2026-11-29)
Section titled “0.11.0 (2026-11-29)”- Breaking: the error code
AMBIGUOUSis gone.parseWordsreads up to 15 digits before and afterfaingoand givesOUT_OF_RANGEabove.parseDatewithout a style tries the styles in order:5 Mey 12is 5 May of year 12. date: NewspellDateTimewrites the date, then the time in words:2026-11-23T14:30→23 Novambra 2026 amin'ny roa sy sasany tolakandro.
0.10.0 (2026-11-28)
Section titled “0.10.0 (2026-11-28)”date: NewspellTimesays the time of day in Malagasy:14:30→amin'ny roa sy sasany tolakandro.parseTimereads it back.ariary: New optioncurrencyDisplay: 'code':formatAriary(1500, { currencyDisplay: 'code' })→MGA 1 500.
0.9.0 (2026-11-27)
Section titled “0.9.0 (2026-11-27)”words: Breaking: a count before a group word is one phrase joined byamby(Wikipedia, dictionary).201 000 000→iraika amby roanjato tapitrisa(it sharediray sy roanjato tapitrisawith 200 000 001),280 000 000→valopolo amby roanjato tapitrisa. Numbers below 1000 keepsyfrom 200 (348→valo amby efapolo sy telonjato, Peace Corps lessons).words: NewspellOrdinal:3→fahatelo,4→fahefatra,1→voalohany.words: NewparseWords,safeParseWords,tryParseWords: words back into the number. Phrases two numbers share (only from one million billion up) areAMBIGUOUS.ariary: Breaking: nothing is rounded. Reading or converting an amount a number cannot hold isPRECISION_LOSS(wasOUT_OF_RANGE, or a silently rounded value);{ as: 'text' }gives the exact digits. Every function that takes an amount also takes decimal text. Reading takes up to 329 characters, so every formatted amount reads back.ariary:1,500is 1.5 Ar: a recorded decision, no longer under review.phone: Breaking:036(Yas) and fixed lines (020,022) are valid instead ofUNKNOWN_OPERATOR. A parsed number hastype(mobileorfixed) andarea, the town of a geographic number.date: NewparseDate,safeParseDate,tryParseDate: every style back into{ year, month, day }.- New error codes
PRECISION_LOSSandAMBIGUOUS.
Known bugs fixed in 0.9.0: two numbers with the same words (words), silent rounding when reading or converting (ariary), formatted amounts too long to read back (ariary), and 036 and fixed lines rejected (phone). Still open: a few phrases from one million billion up name two numbers (the reader answers AMBIGUOUS), and 5 Mey 12 reads as two dates because Mey is both the name and the abbreviation of May (parseDate answers AMBIGUOUS unless you pass the style). The full list is in the spec README.
0.8.0 (2026-11-27)
Section titled “0.8.0 (2026-11-27)”- Breaking: function names now use the domain’s words:
spell(wasnumberToWords),spellAriary(ariaryToWords),parsePhone,safeParsePhone,tryParsePhone,isValidPhone,formatPhone(were…PhoneNumber),monthName(getMonthName),weekdayName(getWeekdayName). PHP:NumberWords::spell()takes an int, a float or text;->spell()replaces->toWords(). Outputs are unchanged. words: Decimal text is read exactly:spell('1500.25')→dimanjato sy arivo faingo dimy amby roapolo. Text that is not plain decimal isINVALID_FORMAT;'12'readsroa ambin'ny foloinstead ofINVALID_TYPE.words: In the traditional system, a number of 10¹⁹ or more (text only) is written in the standard system.ariary:spellAriarytakes the same decimal text.
0.7.0 (2026-11-27)
Section titled “0.7.0 (2026-11-27)”words: New optionsystem: 'traditional': one name per power of ten, each with a single digit.30 000 000→telo safatsiroainstead oftelopolo tapitrisa. 10⁷–10¹⁵ come from Assimil, and 10¹⁶–10¹⁸ are derived from itsfaharoarule. The standard system stays the default, and its output is unchanged.ariary:ariaryToWordstakes the samesystemoption.
0.6.0 (2026-11-26)
Section titled “0.6.0 (2026-11-26)”phone: New prefix035for Airtel Madagascar, on sale since 22 June 2026:035 12 345 67→ operatorairtelinstead ofUNKNOWN_OPERATOR.phone: Breaking: Telma is now Yas Madagascar (since 26 November 2024). The operator idtelmais nowyas, namedYas Madagascar; PHPOperator::Telmais nowOperator::Yas.phone:036, announced by Yas without a published source yet, staysUNKNOWN_OPERATORand is listed under Waiting for a source.
0.5.0 (2026-11-26)
Section titled “0.5.0 (2026-11-26)”words: Breaking: spells numbers of any size.lavitrisatakes a count of any size, so 10¹² isarivo lavitrisainstead ofOUT_OF_RANGE. Each language stops at its largest exact number.words: Decimals, read withfaingo:3.14→telo faingo efatra ambin'ny folo. PHP addsNumberWords::fromFloat().words: New section listing what waits for a source or an expert: negative numbers, and the old names for 10⁷ and above.ariary: Breaking: no more 999 999 999 999 cap, and decimal amounts after a comma:Ar 1 500,5. PHP addsAriary::fromFloat();$amountisint|float.ariary: Breaking:parseAriary('1,500')reads 1.5 instead of throwingINVALID_FORMAT. For English-style text, pass{ grouping: 'comma', decimal: 'dot' }.ariary: Newgrouping: commaanddecimaloptions for formatting and the three parsers; the defaults stay Malagasy.ariary: Breaking: FMG conversion is exact in decimal and accepts any francs:fmgToAriary(7501)→1500.2instead ofOUT_OF_RANGE;ariaryToFmg(0.07)→0.35.ariary: Points under review: the default reading of1,500, rounding of very long decimals, and formatted text longer than the 32-character reading limit.
0.4.0 (2026-11-25)
Section titled “0.4.0 (2026-11-25)”words: Breaking: a count of one is bare only forarivo:10 000→iray alina,1 000 000→iray tapitrisa;1 000staysarivo.
0.3.0 (2026-11-25)
Section titled “0.3.0 (2026-11-25)”words: Breaking: hundreds from 200 join withsyat every size (205→dimy sy roanjato), and 11–19 useambin'ny(11→iraika ambin'ny folo).
0.2.0 (2026-11-24)
Section titled “0.2.0 (2026-11-24)”spec: Breaking: modules moved tomodules/and schemas toschemas/. Adds the ariary and date modules.
0.1.0 (2026-11-23)
Section titled “0.1.0 (2026-11-23)”spec: First spec: shared error codes and schemas, the words and phone modules.