diff --git a/fp-includes/core/core.date.php b/fp-includes/core/core.date.php index 6e1ec52..4d240e5 100755 --- a/fp-includes/core/core.date.php +++ b/fp-includes/core/core.date.php @@ -1,23 +1,51 @@ _get_plugin_filepath('function','html_options'); /* Default values. */ $prefix = "Date_"; - $start_year = strftime("%Y"); + $start_year = date_strformat("%Y"); $end_year = $start_year; $display_days = true; $display_months = true; @@ -142,8 +142,8 @@ function smarty_function_html_select_date($params, &$smarty) $time = $found[1]; } else { // use smarty_make_timestamp to get an unix timestamp and - // strftime to make yyyy-mm-dd - $time = strftime('%Y-%m-%d', smarty_make_timestamp($time)); + // date_strformat to make yyyy-mm-dd + $time = date_strformat('%Y-%m-%d', smarty_make_timestamp($time)); } // Now split this in pieces, which later can be used to set the select $time = explode("-", $time); @@ -151,16 +151,16 @@ function smarty_function_html_select_date($params, &$smarty) // make syntax "+N" or "-N" work with start_year and end_year if (preg_match('!^(\+|\-)\s*(\d+)$!', $end_year, $match)) { if ($match[1] == '+') { - $end_year = strftime('%Y') + $match[2]; + $end_year = date_strformat('%Y') + $match[2]; } else { - $end_year = strftime('%Y') - $match[2]; + $end_year = date_strformat('%Y') - $match[2]; } } if (preg_match('!^(\+|\-)\s*(\d+)$!', $start_year, $match)) { if ($match[1] == '+') { - $start_year = strftime('%Y') + $match[2]; + $start_year = date_strformat('%Y') + $match[2]; } else { - $start_year = strftime('%Y') - $match[2]; + $start_year = date_strformat('%Y') - $match[2]; } } if (strlen($time[0]) > 0) { @@ -188,8 +188,8 @@ function smarty_function_html_select_date($params, &$smarty) $month_values[''] = ''; } for ($i = 1; $i <= 12; $i++) { - $month_names[$i] = strftime($month_format, mktime(0, 0, 0, $i, 1, 2000)); - $month_values[$i] = strftime($month_value_format, mktime(0, 0, 0, $i, 1, 2000)); + $month_names[$i] = date_strformat($month_format, mktime(0, 0, 0, $i, 1, 2000)); + $month_values[$i] = date_strformat($month_value_format, mktime(0, 0, 0, $i, 1, 2000)); } $month_result .= '';