HP3000-L Archives

March 2005, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Greg Stigers <[log in to unmask]>
Reply To:
Greg Stigers <[log in to unmask]>
Date:
Fri, 25 Mar 2005 21:13:37 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (34 lines)
Quoting Jeff Kell <[log in to unmask]>:
> Now detect Easter and I'll be impressed :-)
UTC takes Easter as a holiday? Sure, I can plagiarize well enough; isn't
that why I had asked how others handle holidays last year?

Shamelessly lifting from http://aa.usno.navy.mil/faq/docs/easter.html, at
the
bottom of that page. SETVAR Y to the long year in question. Then:
setvar c = y / 100
setvar n ( y - 19 * ( y / 19 ))
setvar k ( ( c - 17 ) / 25)
setvar i ( c - c / 4 - ( c - k ) / 3 + 19 * n + 15)
setvar i ( i - 30 * ( i / 30 ))
setvar i ( i - ( i / 28 ) * ( 1 - ( i / 28 ) * ( 29 / ( i + 1 ) ) * ( ( 21 -
n ) / 11 ) ))
setvar j ( y + y / 4 + i + 2 - c + c / 4)
setvar j ( j - 7 * ( j / 7 ))
setvar l ( i - j)
setvar m ( 3 + ( l + 40 ) / 44)
setvar d ( l + 28 - 31 * ( m / 4 ))
Echo In !y, Easter is on !m/!d

And I bet one can tweak the formula for d to give you Good Friday. Speaking
of which, have a pleasant Good Friday and Happy Easter, or a Happy Purim, or
a nice weekend, or ...

Now, about how others handle having jobs figure out not to run on
holidays...

Greg Stigers

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2