Solved

Determing dates for floating holidays

Posted on 2004-04-17
8
362 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 4

Expert Comment

by:john-at-7fff
ID: 10850801
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
ID: 10850810
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
ID: 10850925
I did read the link, but it doesnt go over the high holidays.  Ie, the Jewish holidays, etc.
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 3

Expert Comment

by:tolgadalkilic
ID: 10850927
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
 

Author Comment

by:elbarro
ID: 10851904
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
ID: 10851928
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
ID: 10853064
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
ID: 10853209
No problem. See your other question for a more complete answer.
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

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 …
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

734 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