More actions
No edit summary |
No edit summary |
||
Line 25: | Line 25: | ||
''bool b = DateTime_isLeapYear(year);'' | ''bool b = DateTime_isLeapYear(year);'' | ||
''if (b) print(year + " is a leap year.");'' | ''if (b) print(convertToString(year) + " is a leap year.");'' | ||
''else print(convertToString(year) + " is not a leap year."); '' | ''else print(convertToString(year) + " is not a leap year."); '' | ||
''//Result: 2008 is a leap year. '' | ''//Result: 2008 is a leap year. '' | ||
'''Availability''' | '''Availability''' |
Latest revision as of 07:50, 21 December 2011
DateTime_isLeapYear
Check whether year is leap year or not
Syntax
DateTime_isLeapYear(year)
Arguments
- year: is number
Return value
bool
Example
number year = 2008;
bool b = DateTime_isLeapYear(year);
if (b) print(convertToString(year) + " is a leap year.");
else print(convertToString(year) + " is not a leap year.");
//Result: 2008 is a leap year.
Availability
Version 5.7