Leap Years

Determines whether a year is a leap year or not.

Leap Year
Copy  •  js
if(empty(prop("Year")), false, prop("Year") / 400 % 1 == 0 or prop("Year") / 4 % 1 == 0 and prop("Year") / 100 % 1 != 0)
Explanation
Leap Year (From Date)
Copy  •  js
if(empty(prop("Date")), false, year(prop("Date")) / 400 % 1 == 0 or year(prop("Date")) / 4 % 1 == 0 and year(prop("Date")) / 100 % 1 != 0)
Days This Year
Copy  •  js
if(year(now()) / 400 % 1 == 0 or year(now()) / 4 % 1 == 0 and year(now()) / 100 % 1 != 0, 366, 365)
Previous & Next