See also: lastDay |
Calculates the date of the first weekday within the month of the year from the passed arguments.
JSV_firstDay(expWD, expM, expY)
n/a
The function firstDay returns the date of the first weekday within the month of the year.
The firstDay function uses the following arguments.
Argument | Description |
expWD |
Weekday of interest. Valid weekday values include:
|
expM |
Month of interest. Valid months include:
|
expY | Year of interest. |
n/a
The following lines of code
var i = 0;
var today = new Date(), year = today.getYear()+1900;
document.write( "The last weekdays within " +
monthNames[today.getMonth()] + ", " +
year + " are:" );
for (i=0; i<7; i++)
document.write( dayNames[i] + ' ' + JSV_firstDay(i,today.getMonth(),year) );
produce
Copyright © 1998-2000 Roaring Fork Software. All rights reserved.