Home Contents | # date:isNull | Date/Time | Core4 Lua Commands

## SYNOPSIS

1. flag = date:isNull()
2. flag = date:isValid()

## DESCRIPTION

date:isNull() checks if date is null (0000-00-00), which is also an invalid date.

date:isValid() checks if date is a valid date.

## RETURN VALUE

A boolean indicating the success of the check.

## ERRORS

Raises an error if date is not a date instance.

## EXAMPLE

> >
d = clock.newDate() print(d:isNull(), d:isValid())
true false

## SEE ALSO

clock.currentDate, clock.newDate, date(), date:addDays, date:addMonths, date:addYears, date:day, date:dayOfWeek, date:dayOfYear, date:days90, date:daysInMonth, date:daysInYear, date:daysTo, date:format, date:month, date:set, date:setDays90, date:weekNumber, date:year, tostring(date)