Determines whether or not the passed value is a valid day.
JSV_isDay(expD, expM, expY)
n/a
The isDay function returns true if the expression expD is a valid day for the given month expression expM and year expression expY; otherwise, false.
The isDay function uses the following argument.
Argument | Description |
expD | The day as an integer value of 1-31. |
expM | The month as an integer value of 1-12 for the day being tested. |
expY | The four-digit year for the day being tested. |
n/a
JSV_isLeapYear, JSV_isInteger, JSV_isMonth
The following lines of code
var iDay = 29, iYear = 1999, iMonth = 2;
document.write( "Is " + iDay.toString().bold() + " a valid day for month " +
iMonth.toString().bold() + " of " +
iYear.toString().bold() + "? " + JSV_isDay(iDay,iMonth,iYear) );
iDay = 29; iYear = 2000; iMonth = 2;
document.write( "Is " + iDay.toString().bold() + " a valid day for month " +
iMonth.toString().bold() + " of " +
iYear.toString().bold() + "? " + JSV_isDay(iDay,iMonth,iYear) );
iDay = 31; iYear = 1999; iMonth = 11;
document.write( "Is " + iDay.toString().bold() + " a valid day for month " +
iMonth.toString().bold() + " of " +
iYear.toString().bold() + "? " + JSV_isDay(iDay,iMonth,iYear) );
produce
Copyright © 1998-2000 Roaring Fork Software. All rights reserved.