Software Venture Consulting

FileMaker Pro downloads & Resources
FileMaker Custom Functions
FileMaker Web Viewer Examples
FileMaker Pro & Lasso Consulting
FileMaker Books
FileMaker Articles
FileMaker Error Reference

Free Web Tools
Free FileMaker Tools

Personal Pages

Shopping Cart
Shopping Cart


Free Newsletter


Privacy Policy

FileMaker is a registered trademark of FileMaker, Inc. in the U.S. and other countries.


 FileMaker Pro Custom Functions

List  |  Show Random  |  Upload  |  Add This to Your Site

HolidayNameByDate ( myDate )

Rate this function:  

  Average rating: 4.1  (35 votes)
  Discuss this Custom Function

Jonathan Mickelson, Thought Development Corp.

Returns the Holiday Name matching a Date, i.e. for a calendar. A dynamic holiday list is built within for stand-alone operation.

Sample Input:
HolidayNameByDate ( getAsDate ( "1/1/2004" ) )
HolidayNameByDate ( getAsDate ( "12/25/2010" ) )
HolidayNameByDate ( getAsDate ( "2/25/2010" ) )
Sample Output:
"New Year's Day"
(blank result)

 Then copy & paste into FileMaker Advanced's Edit Custom Function window.


UPDATED: 4/6/2010
CHANGE: Added "= " literal text in front of the "exists" variable's patterncount test to correct for matching of partial dates in list, which incorrectly flagged 2/25/2010 as "Christmas", in addition to the correct 12/25/2010. Thanks to Bill Doerrfeld, for pointing out this logic problem!


This function returns the corresponding US (can be modified for other countries) Holiday Name for the supplied Date. The list of Holidays can be found/modified/expanded in the Variable Declarations within the calculation.

The Holiday List used internally is identical to the list generated by the another separate custom fucntion which can also be used to display this list, called "HolidayListByYear ( yearNumber )" and could be substituted for the holidayList variable within the calc, if one wanted to make it dependant upon an external Custom Function. The Author opted for a stand-alone approach.

The result is null ("") if there is no match, so that it can be used as an autoenter in a calendar solution or other type of value lookup.

NOTE: This function REQUIRES the use of another custom function called: "DateByDayOccur" which performs date calculations for dates which occur on certain occurances of a day within a month, as in the example of Thanksgiving which falls on the "Fourth Thursday of November".

Output: Text - Holiday Name

Parameters: myDate - Any valid Date

Special thanks: To Dan Kaplan, of for distilling
many holiday/calendaring sources on the net.

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

This is my Custom Function and I want to edit it


The following line:

exists = PatternCount ( holidayList ; searchCrit ) ;

leads to failure as 12/25/2010 and 2/25/2010 both contain the "2/25" pattern. Accordingly, you'll get Xmas day on Feb. 25th. Xmas twice a year, nice!

Bill Doerrfeld, Seattle
April 05, 2010 10:52pm

Good catch Bill, we'd been looking into this recently as we got a couple of false hits like Thanksgiving in January! I'll be looking into updating the calc soon!

If anyone beats me to it post as a comment and I'll make the update!


Jonathan Mickelson, Los Angeles
April 06, 2010 3:29pm

The change has been made and updated on the site, thanks again Bill, for pointing this out!

The line:

exists = PatternCount ( holidayList ; searchCrit ) ;

Was changed to:

exists = PatternCount ( holidayList ; "= " & searchCrit ) ;

Jonathan Mickelson, Los Angeles
April 06, 2010 4:00pm

Make a comment about this Custom Function (please try to keep it brief & to the point). Anyone can post:

Your Name:
characters left. If you paste in more than 1500 characters, it will be truncated. Discuss the function - advertisements and other useless posts will be deleted.
Answer 4 + 5 =
Search for Custom Functions:

Custom Functions Widget
Download the Custom Function Dashboard Widget for OS X
Keep all the latest Custom Functions right at your fingertips!

Newest Custom Functions:

1. HexUUIDToNum_cf (_uuid)
  (Sat, Jun 16, 1:55pm)
2. httpResponseCode ( responseHeaders )
  (Tue, Jun 12, 10:40pm)
3. FindDuplicateCharacters ( string )
  (Fri, Jun 08, 5:01pm)
4. FieldRepetitionLast ( field ; maxRepetition )
  (Wed, Jun 06, 6:05pm)
5. CountModifiedRecords ( NameTimestampField ; StartTimestamp ; EndTimestamp )
  (Mon, May 28, 8:23am)
6. JSONArrayLength ( JSONArrayStr )
  (Fri, May 25, 7:46am)
7. interpolation (y1; y2; y3; x1; x2; x3; x1y1; x2y1; x1y2; x2y2; rnd)
  (Sat, May 19, 3:55am)
8. @JSONFormatElements ( json )
  (Tue, May 15, 3:31am)

RSS Feed of Custom Functions