just-time option seems doesn't work for italian
manueledones opened this issue · comments
Hi,
thanks for this lib, it's great :)
I think there should be an issue with the "Just-time" option with italian language.
format(date, 'time') removes the 'ago' keyword if the english locale is set, but it doesn't remove the 'fa' keyword if the italian locale is set.
Thank you
Hi.
Yes, because there're no such language files for Italian.
https://github.com/catamphetamine/javascript-time-ago/tree/master/locale-more-styles
You can add long-convenient
and short-convenient
for it
.
Actually, I meant long-time
, not long-convenient
.
- Go to
node_modules/javascript-time-ago/locale-more-styles
. mkdir it
.cd it
.- Create
long-time.json
file there (analogous to the one for English language). - Go to
node_modules/javascript-time-ago/locale/it
. - Edit
index.js
: add'long-time': require('../../locale-more-styles/it/long-time.json'),
- See if it works.
yes it works, I'm not sure what to type in the 'now' object, I mean the value of now > future, and now > past may depend on the context or so, an example of when they will be applied would be helpful.
Another problem is that I cannot versioned the node_modules folder, so my editings will be lost if I remove the node_modules... An official pull request would be helpful?
"now" is supposed to be less than a second. It's an abstract thing. 0 < now < second
.
so my editings will be lost if I remove the node_modules
Create a pull request and it will be merged, if it's correct.
@manueledones Released javascript-time-ago@2.0.5
with your changes.