Skip to content

An extra time adverb has been added to the original package. It accepts negative durations. "-361000" becomes "6 minutes, 1 second ago". For more information check below "timeAdverb" option.

License

cmldk/HumanizeDuration.js

 
 

Repository files navigation

Humanize Duration

An extra time adverb has been added to the original package. It accepts negative durations. "-361000" becomes "6 minutes, 1 second ago".

timeAdverb

Time adverb added to the result according to duration. This accepts negative durations while using it.

humanizeDuration(363000); // '6 minutes, 3 seconds'
humanizeDuration(363000, { timeAdverb: true }); // 'in 6 minutes, 3 seconds'
humanizeDuration(-363000, { timeAdverb: true }); // '6 minutes, 3 seconds ago'
humanizeDuration(-363000, { language: "tr", timeAdverb: true }); // '6 dakika, 3 saniye önce'

About

An extra time adverb has been added to the original package. It accepts negative durations. "-361000" becomes "6 minutes, 1 second ago". For more information check below "timeAdverb" option.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%