Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: leap year
well, for a start, here is the definition (with thanks to google):
In the Gregorian calendar, which is the calendar used by most modern countries,
the following rules decides which years are leap years:
so in the first step, I would round the lower bound YYYY value up to the next
multitude of 4,
round the upper bound YYYY value down to the previous multitude of 4 -- this
gives you a starting value.
then, in a similar way, subtract the multitudes of 100; and finally, add a correction for the multitudes of 400.
kind regards,
Lex.
Hi,
I need to write a PL/SQL function to
show how many times the leap year occurred between two dates.
The maximum range between dates is 10 years.
Please help.
Thanks,
Inessa.
--
http://www.freelists.org/webpage/oracle-l
--
http://www.freelists.org/webpage/oracle-l
Received on Tue May 24 2005 - 10:19:53 CDT