Holiday List

  • Comments posted to this topic are about the item Holiday List

  • This function has Fathers' Day on 6/12 this year. It was actually on the 19th. I don't have the time to check the rest.

  • Thanks, I thought that had been fixed, but I think I sent the script prior to the fix....

    Father's day is actually the third Sunday in June, the script has the second Sunday....

    IF @nYear>=1910 INSERT INTO @Holidays (Holiday_name,Holiday_date)

    ????VALUES ('Fathers Day',dbo.FloatingDate(2,1,6,@nYear)) -- 2nd Sundy in June

    Change the dbo.FloatingDate(2,1,6,@nYear) to

    dbo.FloatingDate(3,1,6,@nYear)

    and tweak the comment...

  • A nice addition would be a "Federal" bit column or maybe a @FederalOnly parameter.

  • They're not exactly holidays but the start and end of daylight savings time. Maybe I'll see if I can tack it on.

    Ken

  • Good suggestion, I'll take a look and see if I can add that and submit a revised script...

    Thanks...

    Hope you found the function helpful

  • Joe, definitely a useful script. Some weird things when in the formatting of indentations. I copied all the code out of the block and pasted it into SSMS. Won't compile due to the way those line leading tabs or spaces are interpreted. Maybe something on my end.

    Ken

  • ken.trock (6/24/2011)


    Joe, definitely a useful script. Some weird things when in the formatting of indentations. I copied all the code out of the block and pasted it into SSMS. Won't compile due to the way those line leading tabs or spaces are interpreted. Maybe something on my end.

    Ken

    That happens from time to time with scripts on SSC.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Nice script - thanks for sharing.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • I fixed the script to handle Father's Day properly

    I revised the script to handle daylight savings start and end dates...

    I also replaced all tabs with spaces, so hopefully that will allow it to load without errors

  • A couple lingering tabs in the new daylight savings calculation but otherwise working well. Thanks!

    Ken

Viewing 11 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply