Alarm time depending on month

On the first day of each month, cancel the repeating daily alarms and create new daily alarms with the new start and end times. Find the start of the month the usual way:

  if (thisMonth != PrevousMonth) {
    PreviousMonth = thisMonth;
    // Update the daily alarm times
  }