Is leap year action in Datetime
- Updated: 2024/07/15
Is leap year action in Datetime
The Is leap year action in the Datetime package verifies whether the year in the specified date is a leap year and stores the result in a Boolean variable.
To check whether a given year is a leap year, do the following:
- Double-click or drag the Is leap year action from the Datetime package in the Actions palette.
- Select either the Datetime or
Variable tab from the Date and time
variable to check field:
- Datetime: Select the date, time, and timezone values from the dropdown.
- Variable: Select a Datetime variable.
- Select the boolean variable from the Assign the output to a
variable field to assign the output.Note: If you select system date in the Date and time variable to check field and the variable value is a leap year, the system stores True as the output in the Boolean variable. If the value in the Date and time variable to check field is not a leap year, the system stores False as the output in the Boolean variable. For example, the system date (10-07-2024) will retrieve the value as True because 2024 is a leap year. Similarly, the system date (10-07-2025) will retrieve the value as False, as 2025 is not a leap year.
Example of using Is leap year action in an automation
In this example, you will create an automation that checks if the given year is a leap year and stores the output in a variable.