AllegroDataSolutions

Calculating Leap Year

Discussion created by AllegroDataSolutions on Apr 5, 2012
Latest reply on Apr 6, 2012 by AllegroDataSolutions

I am just wondering what other developers think is the best formula for calculating a leap year.

 

Say, for example, you want to show a date that is 12 months later than the date the user enters. (Note that's 12 MONTHS, not 365 days later.)

 

So, if the date entered is 3/31/2011, result would be 2/29/2012 and if he enters 3/31/2012, the result would be 2/28/2013.

Outcomes