private function formatN(&$str) {
    if (strstr($str, '%N')) {
      $wdn = $this->weekDayNum();  // Convert 0=Mon 6=Sun to above format
      $str = str_replace('%N', $wdn == 0 ? 7 : $wdn, $str);
    }
  }