本文整理汇总了PHP中HabariDateTime::difference方法的典型用法代码示例。如果您正苦于以下问题:PHP HabariDateTime::difference方法的具体用法?PHP HabariDateTime::difference怎么用?PHP HabariDateTime::difference使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HabariDateTime
的用法示例。
在下文中一共展示了HabariDateTime::difference方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: die
<?php
if (!defined('HABARI_PATH')) {
die('No direct access');
}
include 'header.php';
?>
<div class="container dashboardinfo transparent">
<!--[if lte IE 6]>
<p><?php
$ie6_age = HabariDateTime::difference('now', 'August 27, 2001');
echo _t("Oh, great! You're using IE6! I've finally found someone I can pawn this old betamax player off on!") . '<br />';
echo _t("If you're reading this you're surfing using Internet Explorer 6, a browser that is %d %s old and cannot cope with the demands of the modern internet.", array($ie6_age['y'], _n('year', 'years', $ie6_age['y']))) . '<br />';
echo _t('Consider switching to <a href="http://mozilla.com">Mozilla Firefox</a>, <a href="http://www.apple.com/safari/download/">Safari</a>, <a href="http://www.google.com/chrome">Google Chrome</a>, or a more recent version of <a href="http://www.microsoft.com/windows/Internet-explorer/default.aspx">Internet Explorer</a>.');
?>
</p>
<![endif]-->
<p>
<?php
if (isset($active_time)) {
_e('%s has been active for %s', array(Options::get('title'), $active_time->friendly(3, false)));
}
?>
<br>
<?php
$content_type_msg = array();
$user = User::identify();
if (!empty($stats['post_count'])) {