]> git.mxchange.org Git - mailer.git/blobdiff - inc/template-functions.php
Theme renamed, missing dash added (minor fixes)
[mailer.git] / inc / template-functions.php
index cf0b136f4d0d2d75ee90ccd32fb72c70da1a8aca..c3ecb5783475fc6dfed2e6db3b071e9bc7685d59 100644 (file)
@@ -704,7 +704,7 @@ function addSelectionBox ($type, $default, $prefix = '', $id = '0', $class = 're
 
                case 'year': // Year
                        // Get current year
-                       $year = date('Y', time());
+                       $year = getYear();
 
                        // Use configured min age or fixed?
                        if (isExtensionInstalledAndNewer('order', '0.2.1')) {
@@ -736,10 +736,10 @@ function addSelectionBox ($type, $default, $prefix = '', $id = '0', $class = 're
                                // Calculate earliest year depending on extension version
                                if (isExtensionInstalledAndNewer('order', '0.2.1')) {
                                        // Use configured minimum age
-                                       $year = date('Y', time()) - getConfig('min_age');
+                                       $year = getYear() - getConfig('min_age');
                                } else {
                                        // Use fixed 16 years age
-                                       $year = date('Y', time()) - 16;
+                                       $year = getYear() - 16;
                                }
 
                                // Construct year selection list
@@ -856,9 +856,9 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align =
 
        // Do we have a leap year?
        $SWITCH = '0';
-       $TEST = date('Y', time()) / 4;
-       $M1 = date('m', time());
-       $M2 = date('m', (time() + $timestamp));
+       $TEST = getYear() / 4;
+       $M1 = getMonth();
+       $M2 = getMonth(time() + $timestamp);
 
        // If so and if current time is before 02/29 and estimated time is after 02/29 then add 86400 seconds (one day)
        if ((floor($TEST) == $TEST) && ($M1 == '02') && ($M2 > '02'))  $SWITCH = getConfig('ONE_DAY');