diff options
-rw-r--r-- | includes/common.inc | 6 | ||||
-rw-r--r-- | modules/system.module | 5 | ||||
-rw-r--r-- | modules/system/system.module | 5 |
3 files changed, 13 insertions, 3 deletions
diff --git a/includes/common.inc b/includes/common.inc index 37a999d31..1ba5d3ddb 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -499,10 +499,10 @@ function format_date($timestamp, $type = "medium", $format = "") { switch ($type) { case "small": - $date = date("m/d/y - H:i", $timestamp); + $date = date(variable_get("date_format", "m/d/Y - H:i"), $timestamp); break; case "medium": - $date = t(date("l", $timestamp)) .", ". date("m/d/Y - H:i", $timestamp); + $date = t(date("l", $timestamp)) .", ". date(variable_get("date_format", "m/d/Y - H:i"), $timestamp); break; case "large": $date = t(date("l", $timestamp)) .", ". t(date("F", $timestamp)) ." ". date("d, Y - H:i", $timestamp); @@ -521,7 +521,7 @@ function format_date($timestamp, $type = "medium", $format = "") { } break; default: - $date = t(date("l", $timestamp)) .", ". date("m/d/Y - H:i", $timestamp); + $date = t(date("l", $timestamp)) .", ". date(variable_get("date_format", "m/d/Y - H:i"), $timestamp); } return $date; } diff --git a/modules/system.module b/modules/system.module index 4e4faf397..bc625b318 100644 --- a/modules/system.module +++ b/modules/system.module @@ -68,6 +68,11 @@ function system_view_options() { $output .= form_select("Maximum comment rate", "max_comment_rate", variable_get("max_comment_rate", 120), $rate, "The maximum submission rate for comments. Its purpose is to stop potential abuse or denial of service attacks."); $output .= "<hr />\n"; + // date settings: + $output .= "<h3>Date format setting</h3>\n"; + $output .= form_select("Date format", "date_format", variable_get("date_format", "m/d/Y - H:i"), array("m/d/Y - H:i" => "m/d/Y - H:i", "d/m/Y - H:i" => "d/m/Y - H:i", "Y/m/d - H:i" => "Y/m/d - H:i"), "The format in which dates are displayed"); + $output .= "<hr />\n"; + // comment settings: $output .= "<h3>Comment settings</h3>\n"; $output .= form_select("Default display mode", "default_comment_mode", $conf["default_comment_mode"], $cmodes, "The default mode in which comments are displayed."); diff --git a/modules/system/system.module b/modules/system/system.module index 4e4faf397..bc625b318 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -68,6 +68,11 @@ function system_view_options() { $output .= form_select("Maximum comment rate", "max_comment_rate", variable_get("max_comment_rate", 120), $rate, "The maximum submission rate for comments. Its purpose is to stop potential abuse or denial of service attacks."); $output .= "<hr />\n"; + // date settings: + $output .= "<h3>Date format setting</h3>\n"; + $output .= form_select("Date format", "date_format", variable_get("date_format", "m/d/Y - H:i"), array("m/d/Y - H:i" => "m/d/Y - H:i", "d/m/Y - H:i" => "d/m/Y - H:i", "Y/m/d - H:i" => "Y/m/d - H:i"), "The format in which dates are displayed"); + $output .= "<hr />\n"; + // comment settings: $output .= "<h3>Comment settings</h3>\n"; $output .= form_select("Default display mode", "default_comment_mode", $conf["default_comment_mode"], $cmodes, "The default mode in which comments are displayed."); |