diff --git a/common.inc.php b/common.inc.php index fd58b2df..733729ac 100644 --- a/common.inc.php +++ b/common.inc.php @@ -1106,4 +1106,19 @@ function theme_icon($icon) { else return ""; } + +function format_date($d) { + global $config; + return date($config['dateformat'],strtotime($d)); +} + +function format_time($t) { + global $config; + return date($config['timeformat'],strtotime($t)); +} + +function format_datetime($dt) { + list($d,$t)=split(" ",$dt); + return format_date($d)." ".i18n("at")." ".format_time($t); +} ?> diff --git a/register_participants.php b/register_participants.php index 578f218e..1ae1bf7d 100644 --- a/register_participants.php +++ b/register_participants.php @@ -382,7 +382,7 @@ if($datecheck->datecheck==0) { if($datecheck->datecheckbefore) - echo notice(i18n("Registration for the %1 %2 is not open yet. Registration will open on %3.",array($config['FAIRYEAR'],$config['fairname'],$config['dates']['regopen']),array("fair year","fair name","registration open date"))); + echo notice(i18n("Registration for the %1 %2 is not open yet. Registration will open on %3.",array($config['FAIRYEAR'],$config['fairname'],format_datetime($config['dates']['regopen'])),array("fair year","fair name","registration open date"))); else if($datecheck->datecheckafter) { echo notice(i18n("Registration for the %1 %2 is now closed. Existing registrants can login and view (read only) their information, as well as apply for special awards (if applicable).",array($config['FAIRYEAR'],$config['fairname']),array("fair year","fair name"))); diff --git a/winners.php b/winners.php index 9a148176..b5288f01 100644 --- a/winners.php +++ b/winners.php @@ -218,7 +218,7 @@ else { list($d,$t)=split(" ",$config['dates']['postwinners']); echo "

".i18n("%1 Winners",array($config['FAIRYEAR']))."

"; - echo i18n("Winners of the %1 %2 will be posted here on %3 at %4",array($config['FAIRYEAR'],$config['fairname'],$d,$t)); + echo i18n("Winners of the %1 %2 will be posted here on %3 at %4",array($config['FAIRYEAR'],$config['fairname'],format_date($d),format_time($t))); $first=false; } //get the "winnersposted" date for the year, and make @@ -254,7 +254,7 @@ else { list($d,$t)=split(" ",$config['dates']['postwinners']); echo "

".i18n("%1 Winners",array($config['FAIRYEAR']))."

"; - echo i18n("Winners of the %1 %2 will be posted here on %3 at %4",array($config['FAIRYEAR'],$config['fairname'],$d,$t)); + echo i18n("Winners of the %1 %2 will be posted here on %3 at %4",array($config['FAIRYEAR'],$config['fairname'],format_date($d),format_time($t))); } }