riskihajar/terbilang
A Laravel/PHP package for converting numbers into Indonesian words (terbilang). Useful for invoices, receipts, and documents that need amount-in-words output, with helpers and facade support for quick integration.
DistanceDate fixes reduce to "N hours ago"-style strings that were previously dropping or misplacing hour/minute components — relevant to activity feeds, notification lists and support-ticket timelines.DistanceDate) is the strongest signal here: it converts this from "plausible but unverified" to "safe to depend on for revenue-adjacent documents."Adopt when:
Look elsewhere (or wrap/extend) when:
intl (NumberFormatter::SPELLOUT) covers far more languages.Upgrade notes for 2.1.1 (PM-relevant):
terbilang.period.show.* → terbilang.distance.show.* means previously published config files silently stop controlling distance output. Republish/merge config as part of the upgrade, and plan a verification pass on any screen using distance dates.Roman now throws InvalidNumber outside 1–3999 instead of returning "". Callers relying on empty-string behavior need try/catch or pre-validation — this is a latent crash risk on user-supplied input, but also the correct behavior (fail loudly rather than render a blank field on a document).short → large-number) will change output strings — expect snapshot/golden-file tests to fail until updated, and check any stored/cached rendered documents.LargeNumber no longer crashes on zero/negative input, and negative numbers no longer render with a double space — low-risk improvements.To executives: This is a small, low-cost library that produces the spelled-out numbers and dates on our customer documents. The new release is a quality release, not a feature release: it fixes several correctness bugs that could have put wrong words on customer-facing output — a misspelled "forty" in English, "Nopember" instead of "November" in Indonesian, a broken Portuguese abbreviation key, and negative/zero amounts that could crash or render badly. Critically, the automated test suite went from 34 to 271 tests, including a component (DistanceDate) that previously had none. That is the difference between "we hope the numbers are right" and "we can prove they are." Recommendation: adopt and schedule the upgrade in a normal maintenance window; no product deadline pressure, but do not skip the two migration steps.
To engineering: Patch-level upgrade with two behavior changes to handle explicitly. (1) The distance-date config namespace moved from terbilang.period.show.* to terbilang.distance.show.* — republish/merge the config and verify any distance-date rendering, otherwise settings are silently ignored. (2) Roman now throws InvalidNumber for values outside 1–3999 rather than returning an empty string — wrap or pre-validate anywhere user input reaches it. Also expect snapshot tests to shift due to translation typo fixes, and add regression coverage around amount-in-words output on invoices/receipts since that is the highest-blast-radius surface. No new dependencies, no deprecations announced.
How can I help you explore Laravel packages today?