PHP Classes

not getting the right Advent start day

Recommend this page to a friend!

      holiday_class  >  All threads  >  not getting the right Advent start day  >  (Un) Subscribe thread alerts  
Subject:not getting the right Advent start day
Summary:not getting the right Advent start day
Messages:2
Author:Daniel Carlson
Date:2015-11-23 14:50:06
 

  1. not getting the right Advent start day   Reply   Report abuse  
Picture of Daniel Carlson Daniel Carlson - 2015-11-23 14:50:06
I love this class! It seems to be functioning in every way BUT one.

When I request the "1st Sunday of Advent" or "Advent Begins" using $cal->GetHoliday, it keeps giving me the day BEFORE Advent, a Saturday.

For example, Advent begins on the 29th of this month (november 2015), but I'm getting the 28th, Saturday.

I tried to modify the NthSundayOfAdvent function, but it doesn't seem like anything happens.

Could you please let me know what specifically I need to do to fix this problem. Other than that it's working great.

  2. Re: not getting the right Advent start day   Reply   Report abuse  
Picture of Dave Smith Dave Smith - 2015-11-23 17:33:51 - In reply to message 1 from Daniel Carlson
Looks like this packages author has not been around for awhile, so in the event he doesn't show up, I figured I would take a look at this.

For 'Advent Begins' I am getting the Julian date...

2457355.5

This converts to...

CE 2015 November 29 00:00:00.0 UT Sunday

I also tested the '2nd Sunday of Advent' and it returned the correct JD as well.

If you are getting the same JD as I have shown above, then there is a problem with your converter.

If you are getting a different JD, then compare your code to ensure that your modifications are not the problem.

Dave