date_is_today(date)

From ENIGMA
Jump to navigation Jump to search

Description

Gets whether the given date-time value occurs on the current days date.

Parameters

Parameter Data type Description
date time_t date-time value

Return Values

boolean: Returns whether the date-time occurs today.

Example Call

// demonstrates checking if today is January 1st 2001, which unless you're a time traveler, I'm sure it is not
if (date_is_today(date_create_date(2001, 1, 1)) {
  // date-time value is the date of the current day
} else {
  // date-time value is not the date of the current day
}