Solved

Determing dates for floating holidays

Posted on 2004-04-17
8
363 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
Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

 
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

More Than Just A Video Library

Train for your certification. Learn the latest DevOps tools. Grow your skillset to do better work.

At Linux Academy, we release new training modules every week so you'll always be up to date on the latest tech.

Question has a verified solution.

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

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,…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
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.

688 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