Solved

Determing dates for floating holidays

Posted on 2004-04-17
8
360 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
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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

770 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