Method Date.getNameOfDay
Get the name of the day
-
Syntax
String Date.getNameOfDay([ Boolean utc ])
Return the name of the day. Ifutcis true then universal time is used. Otherwise the local time is used. -
Parameters
Boolean utc(Optional)- If true then UTC is used; otherwise the local time is used.
- Return value The name of the week day.
-
Examples
- To get the name of the 1st of April 2012
// Create the date var d = new Date(2012,3,1); // Output is 'Sunday' d.getNameOfDay();
- Related Date.format
-
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.
This function has dependencies and will not work stand-alone. Use the download button above instead of copy/paste.
