In the moment.js documentation the following example is given:
moment.duration(1, "minutes").humanize(); // a minute
moment.duration(2, "minutes").humanize(); // 2 minutes
moment.duration(24, "hours").humanize(); // a day
I need to have for this call
moment.duration(1, "minutes").humanize();
an output "1 minute" and I want to have for this string
moment.duration(24, "hours").humanize();
an output "24 hours".
I cannot just replace the "a" word with 1 because it is going to be used for many different languages.
Is that possible? Maybe some simple config / workaround / non-documented feature?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…