Skip to content

Commit

Permalink
Fixing typos in time helper translations
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Mar 21, 2011
1 parent b68bc7d commit 433e9e7
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/Cake/View/Helper/TimeHelper.php
Expand Up @@ -82,19 +82,19 @@ public function convertSpecifiers($format, $time = null) {
private function __translateSpecifier($specifier) {
switch ($specifier[1]) {
case 'a':
$abday = __cn('cake', 'abday', 5);
$abday = __dc('cake', 'abday', 5);
if (is_array($abday)) {
return $abday[date('w', $this->__time)];
}
break;
case 'A':
$day = __cn('cake', 'day', 5);
$day = __dc('cake', 'day', 5);
if (is_array($day)) {
return $day[date('w', $this->__time)];
}
break;
case 'c':
$format = __cn('cake', 'd_t_fmt', 5);
$format = __dc('cake', 'd_t_fmt', 5);
if ($format != 'd_t_fmt') {
return $this->convertSpecifiers($format, $this->__time);
}
Expand All @@ -116,13 +116,13 @@ private function __translateSpecifier($specifier) {
return date('jS', $this->__time);
case 'b':
case 'h':
$months = __cn('cake', 'abmon', 5);
$months = __dc('cake', 'abmon', 5);
if (is_array($months)) {
return $months[date('n', $this->__time) -1];
}
return '%b';
case 'B':
$months = __cn('cake', 'mon', 5);
$months = __dc('cake', 'mon', 5);
if (is_array($months)) {
return $months[date('n', $this->__time) -1];
}
Expand All @@ -133,14 +133,14 @@ private function __translateSpecifier($specifier) {
case 'P':
$default = array('am' => 0, 'pm' => 1);
$meridiem = $default[date('a',$this->__time)];
$format = __cn('cake', 'am_pm', 5);
$format = __dc('cake', 'am_pm', 5);
if (is_array($format)) {
$meridiem = $format[$meridiem];
return ($specifier[1] == 'P') ? strtolower($meridiem) : strtoupper($meridiem);
}
break;
case 'r':
$complete = __cn('cake', 't_fmt_ampm', 5);
$complete = __dc('cake', 't_fmt_ampm', 5);
if ($complete != 't_fmt_ampm') {
return str_replace('%p',$this->__translateSpecifier(array('%p', 'p')),$complete);
}
Expand All @@ -154,13 +154,13 @@ private function __translateSpecifier($specifier) {
case 'u':
return ($weekDay = date('w', $this->__time)) ? $weekDay : 7;
case 'x':
$format = __cn('cake', 'd_fmt', 5);
$format = __dc('cake', 'd_fmt', 5);
if ($format != 'd_fmt') {
return $this->convertSpecifiers($format, $this->__time);
}
break;
case 'X':
$format = __cn('cake', 't_fmt', 5);
$format = __dc('cake', 't_fmt', 5);
if ($format != 't_fmt') {
return $this->convertSpecifiers($format, $this->__time);
}
Expand Down

0 comments on commit 433e9e7

Please sign in to comment.