- n = date:daysInMonth()
- n = date:daysInYear()
SYNOPSIS
DESCRIPTION
The date:daysInMonth() returns the number of days in the month stored in date.
The date:daysInYear() returns the number of days in the year stored in date.
Both function know about leap years and will adjust accordingly.
RETURN VALUE
The number of days in the stored month or year, respectively.
ERRORS
Raises an error if date is not a date instance.
EXAMPLE
>
>
d = clock.newDate(2000, 2, 1)
print(d, d:daysInMonth(), d:daysInYear())
2000-02-01 29 366