Velocity Reviews > Calculating public holiday dates

# Calculating public holiday dates

Jay
Guest
Posts: n/a

 10-07-2003
Nicolaas Hawkins wrote:

> On 06 Oct 2003 , Jay wrote :
>
>>> Easter Sunday is the first Sunday after the first full moon after the
>>> autumnal equinox.
>>>

>>
>> In other (Perl) words:
>>
>> sub isEasterSunday
>> {
>> # Must normalize the date to account for arithmetic on \$dd arg
>> my \$xx;
>> my (\$yy,\$mm,\$dd) = @_;
>> (\$xx,\$xx,\$xx,\$dd,\$mm,\$yy,\$xx,\$xx,\$xx) =
>> localtime(mktime(0,0,12,\$dd,\$mm-1,\$y
>> y-1900));
>> \$mm++;
>> \$yy += 1900;
>>
>> my \$y = \$yy;
>> my \$c = int(\$y/100);
>> my \$n = \$y - 19*int(\$y / 19);
>> my \$k = int((\$c - 17)/25);
>> my \$i = \$c - int(\$c/4) - int((\$c - \$k)/3) + 19*\$n + 15;
>> \$i = \$i - 30*int(\$i/30);
>> \$i = \$i - int(\$i/2*(1-int(\$i/2*int(29/(\$i + 1))*int((21 -
>> \$n)/11)); my \$j = \$y + int(\$y/4) + \$i + 2 - \$c + int(\$c/4);
>> \$j = \$j - 7*int(\$j/7);
>> my \$l = \$i - \$j;
>> my \$m = 3 + int((\$l + 40)/44);
>> my \$d = \$l + 28 - 31*int(\$m/4);
>>
>> return \$TRUE if \$m == \$mm && \$d == \$dd;
>> return \$FALSE;
>> }
>>

>
> You may very well be of that opinion, Jay - but I couldn't POSSIBLY
> comment because I know absolutely nothing of PERL.
>

You don't have to know any Perl - just run the program!

Nicolaas Hawkins
Guest
Posts: n/a

 10-07-2003
On 07 Oct 2003 , Jay wrote :

> Nicolaas Hawkins wrote:
>
>> On 06 Oct 2003 , Jay wrote :
>>
>>>> Easter Sunday is the first Sunday after the first full moon after the
>>>> autumnal equinox.
>>>>
>>>
>>> In other (Perl) words:
>>>
>>> sub isEasterSunday
>>> {
>>> # Must normalize the date to account for arithmetic on \$dd arg
>>> my \$xx;
>>> my (\$yy,\$mm,\$dd) = @_;
>>> (\$xx,\$xx,\$xx,\$dd,\$mm,\$yy,\$xx,\$xx,\$xx) =
>>> localtime(mktime(0,0,12,\$dd,\$mm-1,\$y
>>> y-1900));
>>> \$mm++;
>>> \$yy += 1900;
>>>
>>> my \$y = \$yy;
>>> my \$c = int(\$y/100);
>>> my \$n = \$y - 19*int(\$y / 19);
>>> my \$k = int((\$c - 17)/25);
>>> my \$i = \$c - int(\$c/4) - int((\$c - \$k)/3) + 19*\$n + 15;
>>> \$i = \$i - 30*int(\$i/30);
>>> \$i = \$i - int(\$i/2*(1-int(\$i/2*int(29/(\$i + 1))*int((21 -
>>> \$n)/11)); my \$j = \$y + int(\$y/4) + \$i + 2 - \$c + int(\$c/4);
>>> \$j = \$j - 7*int(\$j/7);
>>> my \$l = \$i - \$j;
>>> my \$m = 3 + int((\$l + 40)/44);
>>> my \$d = \$l + 28 - 31*int(\$m/4);
>>>
>>> return \$TRUE if \$m == \$mm && \$d == \$dd;
>>> return \$FALSE;
>>> }
>>>

>>
>> You may very well be of that opinion, Jay - but I couldn't POSSIBLY
>> comment because I know absolutely nothing of PERL.
>>

>
> You don't have to know any Perl - just run the program!
>

Yeah, OK. No interpreter, no compiler, no nothing. Just run the program.
Yeah, right - I should koko!

--
Nicolaas.

- Born at night, I was. Born LAST night, I wasn't.

Jay
Guest
Posts: n/a

 10-07-2003
Nicolaas Hawkins wrote:

> On 07 Oct 2003 , Jay wrote :
>
>> Nicolaas Hawkins wrote:
>>
>>> On 06 Oct 2003 , Jay wrote :
>>>
>>>>> Easter Sunday is the first Sunday after the first full moon after the
>>>>> autumnal equinox.
>>>>>
>>>>
>>>> In other (Perl) words:
>>>>
>>>> sub isEasterSunday
>>>> {
>>>> # Must normalize the date to account for arithmetic on \$dd arg
>>>> my \$xx;
>>>> my (\$yy,\$mm,\$dd) = @_;
>>>> (\$xx,\$xx,\$xx,\$dd,\$mm,\$yy,\$xx,\$xx,\$xx) =
>>>> localtime(mktime(0,0,12,\$dd,\$mm-1,\$y
>>>> y-1900));
>>>> \$mm++;
>>>> \$yy += 1900;
>>>>
>>>> my \$y = \$yy;
>>>> my \$c = int(\$y/100);
>>>> my \$n = \$y - 19*int(\$y / 19);
>>>> my \$k = int((\$c - 17)/25);
>>>> my \$i = \$c - int(\$c/4) - int((\$c - \$k)/3) + 19*\$n + 15;
>>>> \$i = \$i - 30*int(\$i/30);
>>>> \$i = \$i - int(\$i/2*(1-int(\$i/2*int(29/(\$i + 1))*int((21 -
>>>> \$n)/11)); my \$j = \$y + int(\$y/4) + \$i + 2 - \$c + int(\$c/4);
>>>> \$j = \$j - 7*int(\$j/7);
>>>> my \$l = \$i - \$j;
>>>> my \$m = 3 + int((\$l + 40)/44);
>>>> my \$d = \$l + 28 - 31*int(\$m/4);
>>>>
>>>> return \$TRUE if \$m == \$mm && \$d == \$dd;
>>>> return \$FALSE;
>>>> }
>>>>
>>>
>>> You may very well be of that opinion, Jay - but I couldn't POSSIBLY
>>> comment because I know absolutely nothing of PERL.
>>>

>>
>> You don't have to know any Perl - just run the program!
>>

>
> Yeah, OK. No interpreter, no compiler, no nothing. Just run the program.
> Yeah, right - I should koko!
>

Would you like someone to turn on your computer for you?

Nicolaas Hawkins
Guest
Posts: n/a

 10-07-2003
On 07 Oct 2003 , Jay wrote :

> Nicolaas Hawkins wrote:
>
>> On 07 Oct 2003 , Jay wrote :
>>
>>> Nicolaas Hawkins wrote:
>>>
>>>> On 06 Oct 2003 , Jay wrote :
>>>>
>>>>>> Easter Sunday is the first Sunday after the first full moon after
>>>>>> the autumnal equinox.
>>>>>>
>>>>>
>>>>> In other (Perl) words:
>>>>>
>>>>> sub isEasterSunday
>>>>> {
>>>>> # Must normalize the date to account for arithmetic on \$dd arg
>>>>> my \$xx;
>>>>> my (\$yy,\$mm,\$dd) = @_;
>>>>> (\$xx,\$xx,\$xx,\$dd,\$mm,\$yy,\$xx,\$xx,\$xx) =
>>>>> localtime(mktime(0,0,12,\$dd,\$mm-1,\$y
>>>>> y-1900));
>>>>> \$mm++;
>>>>> \$yy += 1900;
>>>>>
>>>>> my \$y = \$yy;
>>>>> my \$c = int(\$y/100);
>>>>> my \$n = \$y - 19*int(\$y / 19);
>>>>> my \$k = int((\$c - 17)/25);
>>>>> my \$i = \$c - int(\$c/4) - int((\$c - \$k)/3) + 19*\$n + 15;
>>>>> \$i = \$i - 30*int(\$i/30);
>>>>> \$i = \$i - int(\$i/2*(1-int(\$i/2*int(29/(\$i + 1))*int((21 -
>>>>> \$n)/11)); my \$j = \$y + int(\$y/4) + \$i + 2 - \$c + int(\$c/4);
>>>>> \$j = \$j - 7*int(\$j/7);
>>>>> my \$l = \$i - \$j;
>>>>> my \$m = 3 + int((\$l + 40)/44);
>>>>> my \$d = \$l + 28 - 31*int(\$m/4);
>>>>>
>>>>> return \$TRUE if \$m == \$mm && \$d == \$dd;
>>>>> return \$FALSE;
>>>>> }
>>>>>
>>>>
>>>> You may very well be of that opinion, Jay - but I couldn't POSSIBLY
>>>> comment because I know absolutely nothing of PERL.
>>>>
>>>
>>> You don't have to know any Perl - just run the program!
>>>

>>
>> Yeah, OK. No interpreter, no compiler, no nothing. Just run the
>> program. Yeah, right - I should koko!
>>

>
> Then get an interpreter! What a dickhead thing to complain about.
>
>
> Would you like someone to turn on your computer for you?
>
>

I hope you feel better now that you have got that little dose of vitriol

Now, I have got a suggestion for you: go and get stuffed!

--
Nicolaas.

- People like you are the reason we have middle fingers.

T-Boy
Guest
Posts: n/a

 10-07-2003
In article <bltraq\$fvem6\$(E-Mail Removed)-berlin.de>, http://www.velocityreviews.com/forums/(E-Mail Removed)
says...

> >
> > Yeah, OK. No interpreter, no compiler, no nothing. Just run the program.
> > Yeah, right - I should koko!
> >

>
> Then get an interpreter! What a dickhead thing to complain about.
>
>
> Would you like someone to turn on your computer for you?

If he turns his computer on the custom IE logo goes round again. If he
leaves it off, it doesn't. (It was your own brilliant logic, that one)

--
Duncan

Jay
Guest
Posts: n/a

 10-07-2003
T-Boy wrote:

> In article <bltraq\$fvem6\$(E-Mail Removed)-berlin.de>, (E-Mail Removed)
> says...
>
>> >
>> > Yeah, OK. No interpreter, no compiler, no nothing. Just run the
>> > program. Yeah, right - I should koko!
>> >

>>
>> Then get an interpreter! What a dickhead thing to complain about.
>>
>>
>> Would you like someone to turn on your computer for you?

>
> If he turns his computer on the custom IE logo goes round again.

No it doesn't. He has to start up IE for that.

> If he
> leaves it off, it doesn't. (It was your own brilliant logic, that one)

You are very confused.
IE is a program, a computer is a machine.

Jay
Guest
Posts: n/a

 10-07-2003
Nicolaas Hawkins wrote:

> On 07 Oct 2003 , Jay wrote :
>
>> Nicolaas Hawkins wrote:
>>
>>> On 07 Oct 2003 , Jay wrote :
>>>
>>>> Nicolaas Hawkins wrote:
>>>>
>>>>> On 06 Oct 2003 , Jay wrote :
>>>>>
>>>>>>> Easter Sunday is the first Sunday after the first full moon after
>>>>>>> the autumnal equinox.
>>>>>>>
>>>>>>
>>>>>> In other (Perl) words:
>>>>>>
>>>>>> sub isEasterSunday
>>>>>> {
>>>>>> # Must normalize the date to account for arithmetic on \$dd arg
>>>>>> my \$xx;
>>>>>> my (\$yy,\$mm,\$dd) = @_;
>>>>>> (\$xx,\$xx,\$xx,\$dd,\$mm,\$yy,\$xx,\$xx,\$xx) =
>>>>>> localtime(mktime(0,0,12,\$dd,\$mm-1,\$y
>>>>>> y-1900));
>>>>>> \$mm++;
>>>>>> \$yy += 1900;
>>>>>>
>>>>>> my \$y = \$yy;
>>>>>> my \$c = int(\$y/100);
>>>>>> my \$n = \$y - 19*int(\$y / 19);
>>>>>> my \$k = int((\$c - 17)/25);
>>>>>> my \$i = \$c - int(\$c/4) - int((\$c - \$k)/3) + 19*\$n + 15;
>>>>>> \$i = \$i - 30*int(\$i/30);
>>>>>> \$i = \$i - int(\$i/2*(1-int(\$i/2*int(29/(\$i + 1))*int((21 -
>>>>>> \$n)/11)); my \$j = \$y + int(\$y/4) + \$i + 2 - \$c + int(\$c/4);
>>>>>> \$j = \$j - 7*int(\$j/7);
>>>>>> my \$l = \$i - \$j;
>>>>>> my \$m = 3 + int((\$l + 40)/44);
>>>>>> my \$d = \$l + 28 - 31*int(\$m/4);
>>>>>>
>>>>>> return \$TRUE if \$m == \$mm && \$d == \$dd;
>>>>>> return \$FALSE;
>>>>>> }
>>>>>>
>>>>>
>>>>> You may very well be of that opinion, Jay - but I couldn't POSSIBLY
>>>>> comment because I know absolutely nothing of PERL.
>>>>>
>>>>
>>>> You don't have to know any Perl - just run the program!
>>>>
>>>
>>> Yeah, OK. No interpreter, no compiler, no nothing. Just run the
>>> program. Yeah, right - I should koko!
>>>

>>
>> Then get an interpreter! What a dickhead thing to complain about.
>>
>>
>> Would you like someone to turn on your computer for you?
>>
>>

>
> I hope you feel better now that you have got that little dose of vitriol
>
> Now, I have got a suggestion for you: go and get stuffed!

Why? Does "stuffed" emulate Perl?
You should go and get perl.

Howhard
Guest
Posts: n/a

 10-08-2003
Jay wrote:

> Why? Does "stuffed" emulate Perl?
> You should go and get perl.

Great riposte!