Skip to content

Commit

Permalink
Change CldrCommand to use medium dateTimeFormat
Browse files Browse the repository at this point in the history
  • Loading branch information
tanakahisateru committed Apr 17, 2012
1 parent 71848c5 commit 5c26d01
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion build/commands/CldrCommand.php
Expand Up @@ -435,7 +435,16 @@ protected function parseDateTimeFormat($xml,&$data)
$types=$xml->xpath('/ldml/dates/calendars/calendar[@type=\'gregorian\']/dateTimeFormats/dateTimeFormatLength');
if(is_array($types) && isset($types[0]))
{
$pattern=$types[0]->xpath('dateTimeFormat/pattern');
$picked = $types[0];
foreach($types as $element) {
$attrs = $element->attributes();
if($attrs['type'] == 'medium')
{
$picked = $element;
break;
}
}
$pattern=$picked->xpath('dateTimeFormat/pattern');
$data['dateTimeFormat']=(string)$pattern[0];
}
}
Expand Down

0 comments on commit 5c26d01

Please sign in to comment.