本文整理汇总了PHP中Localization::formatDate方法的典型用法代码示例。如果您正苦于以下问题:PHP Localization::formatDate方法的具体用法?PHP Localization::formatDate怎么用?PHP Localization::formatDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Localization
的用法示例。
在下文中一共展示了Localization::formatDate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: clean
}
$added = true;
}
}
}
}
if (is_array($birthdays)) {
$alldayevents = array_merge($alldayevents, $birthdays);
}
$alldaygridHeight = count($alldayevents) * PX_HEIGHT / 2 + PX_HEIGHT / 3;
if ($alldaygridHeight > 150) {
$alldaygridHeight = 150;
}
$loc = new Localization();
$loc->setDateFormat(lang('view date title', $date_format));
$view_title = $loc->formatDate($dtv);
// lang(strtolower(date('l', $dtv))) . date(' j, ', $dtv) . lang('month ' . date('n', $dtv)) . date(' Y', $dtv);
$users_array = array();
$companies_array = array();
foreach ($users as $u) {
$users_array[] = $u->getArrayInfo();
}
foreach ($companies as $company) {
$companies_array[] = $company->getArrayInfo();
}
?>
<div id="calHiddenFields">
<input type="hidden" id="hfCalUsers" value="<?php
echo clean(str_replace('"', "'", escape_character(json_encode($users_array))));
?>
"/>
示例2: count
$added = true;
}
}
}
}
if (is_array($birthdays))
$alldayevents = array_merge($alldayevents,$birthdays);
$alldaygridHeight = count($alldayevents)*PX_HEIGHT/2 + PX_HEIGHT/3;
if($alldaygridHeight > 150){
$alldaygridHeight = 150;
}
$loc = new Localization();
$loc->setDateFormat(lang('view date title'));
$view_title = $loc->formatDate($dtv);// lang(strtolower(date('l', $dtv))) . date(' j, ', $dtv) . lang('month ' . date('n', $dtv)) . date(' Y', $dtv);
$users_array = array();
$companies_array = array();
foreach($users as $u)
$users_array[] = $u->getArrayInfo();
foreach($companies as $company)
$companies_array[] = $company->getArrayInfo();
?>
<div id="calHiddenFields">
<input type="hidden" id="hfCalUsers" value="<?php echo clean(str_replace('"',"'", str_replace("'", "\'", json_encode($users_array)))) ?>"/>
<input type="hidden" id="hfCalCompanies" value="<?php echo clean(str_replace('"',"'", str_replace("'", "\'", json_encode($companies_array)))) ?>"/>
<input type="hidden" id="hfCalUserPreferences" value="<?php echo clean(str_replace('"',"'", str_replace("'", "\'", json_encode($userPreferences)))) ?>"/>
<input id="<?php echo $genid?>type_related" type="hidden" name="type_related" value="only" />
</div>