What a Holiday File Is in MyPhoneExplorer and How to Create One

Updated

A holiday file in MyPhoneExplorer is a plain-text file with the .dat extension that lists holidays so the program can recognize them. Each line defines one holiday, and a flag marks whether it is an official holiday (markets closed) or just another observance. You create the file in a text editor, save it in the program's holiday folder, and then select it in MyPhoneExplorer's options dialog.

What the file contains

Every line in the file represents one holiday and has three values separated by a | character:

Position Value Meaning
1st Name The name of the holiday
2nd 1 or 0 1 = official holiday (markets are closed); 0 = other holiday
3rd Date value When the holiday falls

For example, the site's own sample line for New Year's Day is:

New Years Day|1|0101

How date values work

The date value is made of up to three parts separated by spaces.

  • Base date (required). This can be a fixed day and month (0101 for 1 January, 0507 for 5 July), a movable date such as ES for Easter Sunday or EES for Orthodox Easter Sunday, or a full date with a year (03052006 for 3 May 2006). A full date is only parsed for that one year, so use it only for holidays that can't be calculated any other way.
  • Day counter (optional). Shifts the date by a number of days. For example, Easter Monday is ES +1.
  • Weekday (optional). Pins the holiday to a weekday using MO, TU, WE, TH, FR, SA, or SU.

The site gives these examples:

Ash Wednesday|0|ES -46
Martin Luther King Day|1|0101 +3 MO

The first is 46 days before Easter Sunday. The second is the third Monday in January. The same rules produce the second Sunday in May (0105 +2 SU) or the last Monday in November (3011 -1 MO).

Step by step

  1. Open an existing holiday file in Notepad to see the file structure, as the site suggests.
  2. Add one line per holiday using the Name|1 or 0|datevalue format.
  3. Save the file with the .dat extension, named after your country.
  4. Place it in the holiday folder, which the site says is usually C:\Programs\MyPhoneExplorer\holidays.
  5. Open the options dialog in MyPhoneExplorer and select your holiday file.

Things to watch for

  • Test across several years. The author asks contributors to check that a calendar file works correctly for a few years before sending it in.
  • Unsupported holidays. If a holiday in your country can't be expressed with these date values, the site invites you to contact the author so a calculation method can be found.
  • Sharing files. The author welcomes finished holiday files for inclusion in future versions of MyPhoneExplorer.

The same page also covers language files: these are .ini-style files with the .lng extension, and the author recommends editing them with IniTranslator rather than Notepad. Before starting a translation, send a short email so the author can check whether someone else is already working on that language.