Leap year calculation

Continuing the discussion from Incorrect/incomplete leap year calculation in RPA Developer Foundation:

@Theepan @arivu96 @korygill
I beleive the code just works fine even without year mod 100 <> 0.
I used (year mod 4 = 0) and (year mod 400 = 0) inside if condition. It gives the expected result…
1900 - NOT a LEAP year
2000 - LEAP year
I have been wondering why do we need year mod 100 <>0

Hi @Tarun_Bajpai :wave:

Kindly check the below link:

Cheers!

@monsieurrahul Had been through the link before writing the post.

Main.xaml (11.5 KB)

Check this demo

Hi @Tarun_Bajpai,

Please refer below link.

Regars,
Arivu

Hi @arivu96 @ImPratham45 @monsieurrahul
Thank you all for your replies. but i have something to share. I have written the code same code in two different xaml files using Do While loop. One of the xaml file runs as expected but other one isn’t. I am not able to debug what’s wrong. Could you please look into it and help figure out.
LeapYear_With_DoWhile_Loop.xaml (8.3 KB) - exits the loop even after condition is met
DoWhile_Leap_Year.xaml (5.6 KB) - works as expected i.e. if entered year is not a leap year, input box pops again.