Improved ttTimeHelper::holidayMatch to allow partial wildcards in year.
authorNik Okuntseff <support@anuko.com>
Sun, 28 Apr 2019 00:00:03 +0000 (00:00 +0000)
committerNik Okuntseff <support@anuko.com>
Sun, 28 Apr 2019 00:00:03 +0000 (00:00 +0000)
WEB-INF/lib/ttTimeHelper.class.php
WEB-INF/templates/footer.tpl

index 57790e2..f6d8b92 100644 (file)
@@ -65,8 +65,10 @@ class ttTimeHelper {
    $holiDateSpecArray = explode('-', $holiDateSpec);
 
    // Check year.
-   if ($dateArray[0] != $holiDateSpecArray[0] && $holiDateSpecArray[0] != '****') // **** means all years.
-     return false;
+   for($i = 0; $i < 4; $i++) {
+     if ($dateArray[0][$i] != $holiDateSpecArray[0][$i] && $holiDateSpecArray[0][$i] != '*') // * means any digit matches
+       return false;
+   }
    // Check month.
    if ($dateArray[1] != $holiDateSpecArray[1])
      return false;
index b303ed9..4b60ee5 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.19.4.4997 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.19.4.4998 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>