Method Date.getDaySuffix
Get the english suffix for dates
-
Syntax
undefined Date.getDaySuffix([ Boolean utc ])
This function will return the english day suffix (st, nd, rd or th) for the date. Ifutcis true universal time is used; otherwise the local time is used. -
Parameters
Boolean utc(Optional)- Set to true to use UTC.
-
Return value
No explicit return value. Default value of
undefinedis returned. -
Examples
- // Get the suffix of the 23rd of July 2001
// Create date var d = new Date(2001,6,23); // Output is 'rd d.getDaySuffix();
-
Download
Source
Unless otherwise noted all code in the JSLab Standard Library is licensed as GPLv3. See http://www.gnu.org/licenses/gpl.html for the entire license.
