[HaDe Micro Tutorial] Leap Year Indicator

You can find many articles on the Internet about how to identify a leap year. microsoft.com, wikipedia.org, earthsky.org

However, this is not a frequently used pointer. Maybe someone’s going to use the prepared equation:

I will not work without coffee.

Transparent 1. element:

$(#Dy#%400)==0?100:0$

Transparent 2. element:

$(#Dy#%100)!=0&&(#Dy#%4)==0?100:0$

Place element 2 under element1.

Element 2 is visible whenever the year is divisible 4, but is not divisible by 100.
Element 1 solves the exception by dividing 400.

Thanks and sorry for confusion :slight_smile:

3 Likes

try
Text 1 value YES
Transparency
$((#Dy#-2000)%4)==0?100:0$

Text 2 value No
Transparency
$((#Dy#-2000)%4)==0?0:100$

1 Like

It made me take one more check and found a mistake with me.

A year that is evenly divisible by 100 (for example, 1900) is a leap year only if it is also evenly divisible by 400.

In your solution, 2100 is marked as a leap. It is not right.

And I plan to keep my watch until 2100 :slight_smile:

3 Likes