Solved

Determing dates for floating holidays

Posted on 2004-04-17
8
359 Views
Last Modified: 2006-11-17
Hi all, i'm writing a lil web page in php that displays different messages for different holidays.  The problem i'm having is that there are several floating holidays such as easter.  Basically, is there a quick and easy way of determining dates for such holidays?

Thanks.
0
Comment
Question by:elbarro
  • 4
  • 3
8 Comments
 
LVL 4

Expert Comment

by:john-at-7fff
Comment Utility
elbarro --

Easter is built-in to PHP:

http://www.php.net/manual/en/function.easter-date.php

0
 
LVL 4

Expert Comment

by:john-at-7fff
Comment Utility
This will get you the other holidays:

http://www.michaelthompson.org/technikos/easter.php

And here's his general strategy, which you could adapt:

http://www.michaelthompson.org/technikos/holidays.php
0
 

Author Comment

by:elbarro
Comment Utility
I did read the link, but it doesnt go over the high holidays.  Ie, the Jewish holidays, etc.
0
 
LVL 3

Expert Comment

by:tolgadalkilic
Comment Utility
Shortly NO!
But you can find scripts on other web pages, or you can ask for a script in Web Dev.
I guess it won;t be difficult to create an algorithm to find the hollidays as easter. For example suppose a holiday is in the first weekend of April. You only calculate first saturday of that month. etc..
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

Author Comment

by:elbarro
Comment Utility
Basically what i am looking for is an algorithm to slide into code and convert from to calender system to another
0
 
LVL 4

Accepted Solution

by:
john-at-7fff earned 500 total points
Comment Utility
elbarro --

I hope my suggestions for solving the problem for Easter and other floating holidays based on it was helpful.

Your original question said "Easter" and "such holidays."

You said nothing about the "the Jewish holidays, etc.," or converting from one "calendar system to another."

Maybe you should post a new question that describes your requirements more accurately.
0
 

Author Comment

by:elbarro
Comment Utility
The question stated "easter and other floating holidays".  Although the answer was 1/2 right, you left little room to contine the thread.
0
 
LVL 4

Expert Comment

by:john-at-7fff
Comment Utility
No problem. See your other question for a more complete answer.
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now