- Refactored
twitter
style and styles overall: style can now havethreshold(now)
function and also gradation step can haveformat(value, locale)
function instead ofunit
.
- Renamed
override
tocustom
for styles
- Renamed
fuzzy
style totime
. - Refactored
gradation
s andstyle
s. gradation
is now not being exported fromindex.js
along withday
,month
andyear
(one can stillimport
it manually fromgradation.js
).es6
folder got renamed tomodules
build
folder got renamed tocommonjs
- Renamed
plural
toquantify
inside locale data. - Implemented
Intl.RelativeTimeFormat
proposal polyfill which is now being exported.
- (can be a breaking change for custom styles) Renamed
just-now
unit tonow
andxxx-concise
flavour toxxx_time
(+ flavour.json
files got renamed accordingly).
- (breaking change) When defining a custom
style
itsoverride()
function takesdate
andtime
parameters: nowdate
parameter ofoverride()
is not guaranteed to be set (can be inferred fromtime
).
-
(breaking change) Due to a long-standing engineering flaw in
intl-messageformat
library (the locale data loading process) I dismissed it and this library is now using raw CLDR locale data instead so built-in locale data now holds an extra property: theplural
function taking a number and returning the pluralization type of that number ("one", "few", etc). Therefore, if adding raw CLDR locale data for locales which are not built-in this pluralization function must be passed as the second argument to.locale(localeDataCLDR, pluralsClassifier)
. -
(breaking change)
javascriptTimeAgo.styles
is no more accesible: passstyle
as a string instead. -
(breaking change)
locales
folder inside the package renamed tolocale
(e.g.javascript-time-ago/locales/en
->javascript-time-ago/locale/en
). -
style.flavour
can now be an array
- Changed
yesterday
andtomorrow
labels for Russian localization
- Moved
intl-messageformat
topeerDependencies
- Initial release