[AccessD] Birthday in table

Mark A Matte markamatte at hotmail.com
Fri Jun 15 14:01:30 CDT 2007


Thought I'd share......read a little on this because I thought leap year was 
ever 4 years...but 2096 will be a leap year and there won't be another until 
2104...8 years later?

I also found this on wikipedia's site:

Leap year rules
In order to get a closer approximation, it was decided to have a leap day 97 
years out of 400 rather than once every four years. This would be 
implemented by making a leap year every year divisible by 4 unless that year 
is divisible by 100. If it is divisible by 100 it would only be a leap year 
if that year was also divisible by 400.[2][3] So, in the last millennium, 
1600 and 2000 were leap years, but 1700, 1800 and 1900 were not. In this 
millennium, 2100, 2200, 2300, 2500, 2600, 2700, 2900 and 3000 will not be 
leap years, but 2400 and 2800 will be. The years that are divisible by 100 
but not 400 are known as "exceptional common years". By this rule, the 
average number of days per year will be 365 + 1/4 - 1/100 + 1/400 = 
365.2425.

Cool?

Mark

>From: "Heenan, Lambert" <Lambert.Heenan at aig.com>
>Reply-To: Access Developers discussion and problem 
>solving<accessd at databaseadvisors.com>
>To: "'Access Developers discussion and problem 
>solving'"<accessd at databaseadvisors.com>
>Subject: Re: [AccessD] Birthday in table
>Date: Fri, 15 Jun 2007 14:11:43 -0400
>
>FWIW here's my leap year function...
>
>
>Function bLeap(nYear As Integer) As Boolean
>     bLeap = (nYear Mod 4 = 0 And nYear Mod 100 <> 0) Or (nYear Mod 400 = 
>0)
>End Function
>
>Same logic, just a little briefer - oh, and it returns a Boolean, not a
>Variant.
>
>Lambert
>
>-----Original Message-----
>From: accessd-bounces at databaseadvisors.com
>[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bryan Carbonnell
>Sent: Friday, June 15, 2007 11:54 AM
>To: Access Developers discussion and problem solving
>Subject: Re: [AccessD] Birthday in table
>
>
>On 6/15/07, Arthur Fuller <fuller.artful at gmail.com> wrote:
> > The definition of a leap year is a two-step:
> >
> > 1. if the year is evenly divisible by four then you're cool, except:
> > 2. if the year ends in 00 then it must be evenly divisible by 400 --
> > thus 1900 was not a leap year but 2000 was.
> >
> > That should be enough data.
>
>Determining Leap years are actually a 3 step process
>
>Is the year evenly divisible by 4? If so, it is a leap year, unless... Is
>the year evenly divisible by 100? (for example, 1500?) If so, it is not a
>leap year, unless... Is the year evenly divisible by 400? If so, it is a
>leap year.
>
>Here is a function I cribbed from wikipedia to determine if a year is a 
>leap
>year.
>
>Function ISLEAPYEAR(Year As Integer)
>' This is a function which returns a simple TRUE
>' or FALSE depending on whether it fits.
>
>Dim varAns As Boolean
>If Year Mod 400 = 0 Then
>     varAns = True
>Else
>     If Year Mod 100 = 0 Then
>         varAns = False
>     Else
>         If Year Mod 4 = 0 Then
>             varAns = True
>         Else
>             varAns = False
>         End If
>     End If
>End If
>
>ISLEAPYEAR = varAns
>End Function
>
>--
>Bryan Carbonnell - carbonnb at gmail.com
>Life's journey is not to arrive at the grave safely in a well preserved
>body, but rather to skid in sideways, totally worn out, shouting "What a
>great ride!"
>--
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com
>--
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com

_________________________________________________________________
Need a break? Find your escape route with Live Search Maps. 
http://maps.live.com/default.aspx?ss=Restaurants~Hotels~Amusement%20Park&cp=33.832922~-117.915659&style=r&lvl=13&tilt=-90&dir=0&alt=-1000&scene=1118863&encType=1&FORM=MGAC01




More information about the AccessD mailing list