Provides helpers for quick formatting of dates and numbers. Integration of moment (with languages) and numeral (with languages too).
Ouput the result of moment().duration
.
parameters
duration
: the duration (example:10
)units
: units used for the duration (default ishours
)
usage
Ouput the result of moment.fromNow
.
parameters
date
: the date (example:01/01/2014
)
usage
Ouput the result of moment.format
.
parameters
date
: the date (example:01/01/2014
)format
: format used (default isDD/MM/YYYY
)
usage
Ouput the result of moment.format('LL')
.
parameters
date
: the date (example:01/01/2014
)
usage
Ouput the result of moment.format('MMMM')
(Ouput the full month's name)
parameters
date
: the date (example:01/01/2014
)
usage
Ouput the result of moment.format('MM YYYY')
(Ouput the short month's name and the year)
parameters
date
: the date (example:01/01/2014
)
usage
Ouput the result of numeral().format('$0.00')
or numeral().format('0.00$')
.
parameters
number
: the number to format (example:10
)symbolAtEnd
: wether to show the currency symbol at the end (default isfalse
)
usage
Ouput the result of numeral().format('0%')
.
parameters
number
: the number to format (example:10
). If this number is greater than 1, it will be divided by 100 as numeral expect a number lesser than 1.
usage