?
Solved

Determing dates for floating holidays

Posted on 2004-04-17
8
Medium Priority
?
364 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
7 Extremely Useful Linux Commands for Beginners

Just getting started with Linux? Here's a quick start guide that has 7 commands that we believe will come in handy.

 
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 1000 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month13 days, 21 hours left to enroll

800 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