EvanHahn / HumanizeDuration.js

361000 becomes "6 minutes, 1 second"
https://evanhahn.github.io/HumanizeDuration.js/
The Unlicense
1.65k stars 175 forks source link

Font Size #93

Closed digitalhobo closed 8 years ago

digitalhobo commented 8 years ago

Great module, thanks.

Is their a way to manipulate the font size, so that the number are different sizes to the corresponding result. For example '2 min' would be 2 <small>min</small>

Thanks in advance :0)

EvanHahn commented 8 years ago

I don't intend to add this feature, but you can do it with the spacer and delimiter feature.

// '1 <small>hour</small>, 30 <small>minutes</small>'
humanizeDuration(5400000, {
  spacer: ' <small>',
  delimiter: '</small>, '
}) + '</small>'