当前位置: 首页>>代码示例>>PHP>>正文


PHP relative_modified_date函数代码示例

本文整理汇总了PHP中relative_modified_date函数的典型用法代码示例。如果您正苦于以下问题:PHP relative_modified_date函数的具体用法?PHP relative_modified_date怎么用?PHP relative_modified_date使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了relative_modified_date函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: foreach

		<?php 
foreach ($_['files'] as $file) {
    $simple_file_size = simple_file_size($file['size']);
    $simple_size_color = intval(200 - $file['size'] / (1024 * 1024) * 2);
    // the bigger the file, the darker the shade of grey; megabytes*2
    if ($simple_size_color < 0) {
        $simple_size_color = 0;
    }
    $relative_modified_date = relative_modified_date($file['mtime']);
    $relative_date_color = round((time() - $file['mtime']) / 60 / 60 / 24 * 14);
    // the older the file, the brighter the shade of grey; days*14
    if ($relative_date_color > 200) {
        $relative_date_color = 200;
    }
    ?>
			<tr data-file="<?php 
    echo $file['name'];
    ?>
" data-type="<?php 
    echo $file['type'] == 'dir' ? 'dir' : 'file';
    ?>
" data-mime="<?php 
    echo $file['mime'];
    ?>
" data-size='<?php 
    echo $file['size'];
    ?>
'>
				<td class="filename svg" style="background-image:url(<?php 
    if ($file['type'] == 'dir') {
        echo mimetype_icon('dir');
开发者ID:Teino1978-Corp,项目名称:Teino1978-Corp-owncloud_.htaccess-,代码行数:31,代码来源:owncloud_files_templates_part.list.php

示例2: p

    }
}
?>

<div class="section" id="backgroundjobs">
	<h2 class="inlineblock"><?php 
p($l->t('Cron'));
?>
</h2>
	<?php 
if ($_['cron_log']) {
    ?>
	<p class="cronlog inlineblock">
		<?php 
    if ($_['lastcron'] !== false) {
        $relative_time = relative_modified_date($_['lastcron']);
        $absolute_time = OC_Util::formatDate($_['lastcron']);
        if (time() - $_['lastcron'] <= 3600) {
            ?>
				<span class="cronstatus success"></span>
				<span class="crondate" original-title="<?php 
            p($absolute_time);
            ?>
">
					<?php 
            p($l->t("Last cron job execution: %s.", [$relative_time]));
            ?>
				</span>
			<?php 
        } else {
            ?>
开发者ID:henkRW,项目名称:core,代码行数:31,代码来源:admin.php

示例3: testRelativeTimeYearsAgo

 public function testRelativeTimeYearsAgo()
 {
     $currentTime = 1380703592;
     $elementTime = $currentTime - 86400 * 365.25 * 2;
     $result = (string) relative_modified_date($elementTime, $currentTime, false);
     $this->assertEquals('years ago', $result);
     $elementTime = $currentTime - 86400 * 365.25 * 3;
     $result = (string) relative_modified_date($elementTime, $currentTime, false);
     $this->assertEquals('years ago', $result);
 }
开发者ID:olucao,项目名称:owncloud-core,代码行数:10,代码来源:template.php

示例4: relative_modified_date

 /**
  * Return the relative date in relation to today. Returns something like "last hour" or "two month ago"
  *
  * @param int $timestamp unix timestamp
  * @param boolean $dateOnly
  * @return string human readable interpretation of the timestamp
  * @since 8.0.0
  */
 public static function relative_modified_date($timestamp, $dateOnly = false)
 {
     return \relative_modified_date($timestamp, null, $dateOnly);
 }
开发者ID:samj1912,项目名称:repo,代码行数:12,代码来源:template.php

示例5: relative_modified_date

/**
 * @brief Return the relative date in relation to today. Returns something like "last hour" or "two month ago"
 * @param $timestamp unix timestamp
 * @returns human readable interpretation of the timestamp
 */
function relative_modified_date($timestamp)
{
    return \relative_modified_date($timestamp);
}
开发者ID:jaeindia,项目名称:ownCloud-Enhancements,代码行数:9,代码来源:template.php

示例6: p

    p($l->t('Other'));
    ?>
						...
					</option>
				</select>
			</td>
			<td class="storageLocation"><?php 
    p($user["storageLocation"]);
    ?>
</td>
			<?php 
    if ($user["lastLogin"] === 0) {
        $lastLogin = $l->t('never');
        $lastLoginDate = $lastLogin;
    } else {
        $lastLogin = relative_modified_date($user["lastLogin"]);
        $lastLoginDate = \OC_Util::formatDate($user["lastLogin"]);
    }
    ?>
			<td class="lastLogin" title="<?php 
    p('<span class="usersLastLoginTooltip">' . $lastLoginDate . '</span>');
    ?>
"><?php 
    p($lastLogin);
    ?>
</td>
			<td class="remove">
				<?php 
    if ($user['name'] != OC_User::getUser()) {
        ?>
					<a href="#" class="action delete" original-title="<?php 
开发者ID:Romua1d,项目名称:core,代码行数:31,代码来源:part.userlist.php

示例7: relative_modified_date

            ?>
" title="admin"><?php 
            echo $l->t('Visit');
            ?>
</a>
         <a class="name" href="<?php 
            echo $blog['domain'];
            ?>
" title="<?php 
            echo $l->t('Open it in a new window');
            ?>
" target="_blank">+</a>
        </td>
       <td>
         <?php 
            echo relative_modified_date($blog['registered']);
            ?>
        </td>
      </tr>
    <?php 
        }
        ?>
    <?php 
    } else {
        ?>
    	<tr><td colspan="3">
    	<?php 
        echo $l->t('You have no site registered, please check your');
        ?>
    	 <a class="name" href="<?php 
        echo OC::$CLASSPATH['OC_wordpress_site_list'];
开发者ID:silvioheinze,项目名称:user_wordpress,代码行数:31,代码来源:sites.php


注:本文中的relative_modified_date函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。