Systronix_utilities.cpp
//---------------------------< I S _ V A L I D _ D A T E >----------------------------------------------------
//
// return true when the combination of year, month, and day is a valid date: 30 Feb 2016 is not valid
//
< I S _ V A L I D _ D A T E >
return true when the combination of year, month, and day is a valid date: 30 Feb 2016 is not valid
< I S _ V A L I D _ D A T E > return true when the combination of year month and day is a valid date : 30 Feb 2016 is not valid
boolean Systronix_utilities::is_valid_date (uint16_t year, uint8_t month, uint8_t day)
	{
	if (2 == month)
		{
		if (_is_leap_year (year))
			return (29 < day) ? false : true;
		else
			return (28 < day) ? false : true;
		}
	return (day <= days_in_month[month]) ? true : false;
	}
boolean Systronix_utilities :: is_valid_date ( uint16_t year , uint8_t month , uint8_t day ) { if ( 2 == month ) { if ( _is_leap_year ( year ) ) return ( 29 < day ) ? false : true ; else return ( 28 < day ) ? false : true ; } return ( day <= days_in_month [ month ] ) ? true : false ; }
< I S _ V A L I D _ D A T E >
return true when the combination of year, month, and day is a valid date: 30 Feb 2016 is not valid
< I S _ V A L I D _ D A T E > return true when the combination of year month and day is a valid date : 30 Feb 2016 is not valid