Holidays file enhancements

Forum discussion: http://community.pbspro.org/t/holidays-file-missing-days-will-be-treated-as-all-prime/1440


Background

Holidays file has information about prime/non-prime windows for days of the week for a site. Right now, there's no documented behavior for what happens if data for any of the days is missing or if the data is inconsistent. Also, the behavior for when the year entry is missing is not clearly defined. The general use case, as well as the theme of the prime-time feature in PBS, seems to be to assume prime time if data is insufficient, so it seems like a good idea to officially enforce this behavior. It is also desired to have an empty/commented out holidays file which doesn't need to be updated every year so that it is all prime-time by default.


Proposal

  • If users don't provide prime/non-prime information for any of the days, or if the information is inconsistent, then PBS will assume all prime-time for that day.
  • Ship a commented out holidays file by default so that it is 24x7 prime-time by default.


Design:

  • New holidays file text: The holidays file will now by default be completely commented out and have the following text:

    * UNCOMMENT AND CHANGE THIS TO THE CURRENT YEAR
    *YEAR 1970
    *
    * Prime/Nonprime Table
    *
    * Prime Non-Prime
    * Day Start Start
    *
    * UNCOMMENT AND SET THE REQUIRED PRIME/NON-PRIME START TIMES
    * weekday 0600 1730
    * saturday none all
    * sunday none all
    *
    * Day of Calendar Company
    * Year Date Holiday
    *

    * UNCOMMENT AND ADD CALENDAR HOLIDAYS TO BE CONSIDERED AS NON-PRIME DAYS
    * 1 Jan 1 New Year's Day
    * 359 Dec 25 Christmas Day

    PBS will assume 24x7 prime-time by default now because the holidays file is commented out.

  • Missing year: If the holidays file has the year entry missing, even if it has the day entries listed, PBS will assume 24x7 prime-time.
  • Missing days: If holidays file has missing days then those specific days will be marked as 24hr prime-time.
  • Both prime start and non-prime start is 'all': inconsistent information, such days will be marked as 24hr prime-time as well.
  • Both prime start and non-prime start is 'none': inconsistent information, such days will be marked as 24hr prime-time as well.