ordinalize()

Get the ordinal for an integer (st, nd, rd, or th).

This function is valid in v2.0.0 to v2.12.0. This function has been downloaded 15 times.

Parameters

{number} num
Number for which to get the ordinal.
{boolean=} opt_excludeNum Optional, Default:false
Indicates whether or not to exclude num from the return value.

Returns

{string}
If opt_excludeNum is false-ish a string version of num with the appropriate ordinal string will be returned. If opt_excludeNum is true-ish just the ordinal corresponding to num will be returned.