Automatically Determine Dates for Special Occasions
-
Right, to set the scene, I am creating a website for my partner to sell Floral Arrangements. Now when certain events crops up, i.e. Mothers Day, Fathers Day, Easter, etc, we would like a reminder to appear. No problem. The problem is, the dates for the events change each year, and can't think of a logical way in code to determine the date automatically, as Easter for example falls on a different date each year. Do any of you know of a way to calculate when Special Occasion dates occur each year? Any suggestions? --- Peter M
-
Right, to set the scene, I am creating a website for my partner to sell Floral Arrangements. Now when certain events crops up, i.e. Mothers Day, Fathers Day, Easter, etc, we would like a reminder to appear. No problem. The problem is, the dates for the events change each year, and can't think of a logical way in code to determine the date automatically, as Easter for example falls on a different date each year. Do any of you know of a way to calculate when Special Occasion dates occur each year? Any suggestions? --- Peter M
Hi First you should make a list of all the special days you are interested in, and then do a Google search on how to calculate when is each one. For example, Easter, is the Sunday following the Paschal Full Moon (PFM) date for the year; Mother's Day is always the second Sunday of May and so on. There is a way to calculate each an every one of them. Good luck, Fabian