Brian Dunning's FileMaker Custom Functions

BusinessHolidays ( calendarYear )

Returns a list of observed holidays in calendarYear

  Average rating: 4.4 (28 votes) Log in to vote

Jeremy Bante   Jeremy Bante

https://github.com/jbante/

  Sample input:
BusinessHolidays ( 2011 )
  Sample output:
1/17/2011
2/21/2011
5/30/2011
7/4/2011
9/5/2011
10/10/2011
11/11/2011
11/24/2011
12/26/2011

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

This function returns a return-delimited list of the dates of observed holidays in the specified calendar year. This version of the function includes observed U.S. federal holidays. It should be modified to include any holidays observed by the users of each particular system.

 

Comments

Geoffrey Gerhard   Geoffrey Gerhard, Creative Solutions Incorporated
Nov 17, 2023
Juneteenth was added as a US Federal Holiday in 2021. Add this to the List function to include that holiday in the result...

// Juneteenth (19 June)
Let ( [
~date = Date ( 6 ; 19 ; holidayYear );
~day = DayOfWeek ( ~date )
];
Case (
~day = 1 ; ~date + 1; // following Monday
~day = 7 ; ~date - 1; // previous Friday
/* Else */ ~date
)
);
 
John McElwain   John McElwain
Jul 27, 2026
Thanks for this helpful function. I needed to add the friday after Thanksgiving and found a problem with the Thanksgiving calculation. If the start of the month falls on thursday, it was giving the date a week too early. Here the new calc and the calc for the day after as well...

// Thanksgiving Day (4th Thursday in November)
Date ( 11 ; 22 ; calendarYear ) // earliest possible date
+ Choose ( DayOfWeek ( Date ( 11 ; 1 ; calendarYear ) ) - 1;
4 ; 3 ; 2 ; 1 ; 7 ; 6 ; 5 // adjust for day of week of month start
);

// Thanksgiving Friday (Friday following 4th Thursday in November)
Date ( 11 ; 22 ; calendarYear ) // earliest possible date
+ Choose ( DayOfWeek ( Date ( 11 ; 1 ; calendarYear ) ) - 1;
5 ; 4 ; 3 ; 2 ; 8 ; 7; 6 // adjust for day of week of month start
);
 

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 22 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: