echo $p->id; ?> "><?php echo $p->pretty_name(); ?> </a></td> <td><?php echo h($p->user->pretty_name()); ?> </td> <td><?php echo $p->post_count; ?> </td> <td><?php echo time_ago_in_words($p->created_at); ?> ago</td> </tr> <?php } ?> </tbody> </table> </div> <div id="paginator"> <?php paginator(); ?> </div>
<div class="entity_update"> <?php if ($entity->primary_ext == 'Person' && count($images = $entity->Image)) { ?> <?php $image = $images[0]; ?> <div class="entity_update_image"> <?php echo link_to(image_tag($image->getSmallPath(), array('alt' => '', 'style' => 'height: 35px; border: 0px solid #fff')), $entity->getInternalUrl(), array('title' => $entity->name)); ?> </div> <?php } ?> <?php echo entity_link($entity, 'entity-update-link'); ?> <br /> <span class="text_small">updated by <?php echo user_link($entity->LastUser ? $entity->LastUser : $entity->getLastModifiedUser()); ?> <?php echo time_ago_in_words(strtotime($entity->updated_at)); ?> ago</span> </div>
slot('header_text', $note->User->Profile->public_name); slot('header_link', $note->User->getInternalUrl()); ?> <?php slot('rightcol'); ?> <?php include_partial('user/profileimage', array('profile' => $note->User->Profile)); end_slot(); ?> <span class="text_big"><em> Note posted <?php echo time_ago_in_words(strtotime($note->created_at)) . ' ago'; ?> <?php if (NoteTable::hasNonUsNetworks($note)) { ?> <?php $networks = NoteTable::getNetworksArray($note); ?> <?php $networkLinks = array(); ?> <?php foreach ($networks as $network) { ?> <?php
<tr> <td> <strong><?php echo link_to($object->getOneLiner(), 'entity/addressModifications?id=' . $object->id); ?> </strong> </td> <td> <?php echo $object->created_at; ?> by <?php echo user_link($object->getCreatedByUser()); ?> </td> <td> <?php echo time_ago_in_words(strtotime($object->updated_at)); ?> </td> <td> <?php echo $object->is_deleted ? 'deteled' : 'active'; ?> </td> </td>
?> "> <td><?php echo link_to(h($fp->root->title), array("#show", 'id' => $fp->root_id)); ?> </td> <td><?php echo link_to(h(substr($fp->body, 0, 70) . "..."), array("#show", 'id' => $fp->id)); ?> </td> <td><?php echo h($fp->author); ?> </td> <td><?php echo time_ago_in_words($fp->updated_at); ?> ago by <?php echo $fp->last_updater; ?> </td> </tr> <?php } ?> </tbody> </table> <div id="paginator"> <?php paginator();
$string = '%months% months'; $parameters['%months%'] = round($distance_in_minutes / 43200); } else { if ($distance_in_minutes >= 525960 && $distance_in_minutes <= 1051919) { $string = 'about 1 year'; } else { $string = 'over %years% years'; $parameters['%years%'] = floor($distance_in_minutes / 525960); } } } } } } } } } if (sfConfig::get('sf_i18n')) { require_once dirname(__FILE__) . '/I18NHelper.php'; return __($string, $parameters); } else { return strtr($string, $parameters); } } // Like distance_of_time_in_words, but where to_time is fixed to time() function time_ago_in_words($from_time, $include_seconds = false) { return distance_of_time_in_words($from_time, time(), $include_seconds); } echo time_ago_in_words(time() - 100000);
function test_time_ago_in_words() { $this->assertEqual('over 25 years', time_ago_in_words(mktime(0, 0, 0, 0, 0, date("Y") - 25))); }
<div class="comment avatar-container"> <div class="author"> <h6 class="author"><?php echo link_to(h($post->author), array("user#show", 'id' => $post->creator_id)); ?> </h6> <span class="date"><?php echo link_to(time_ago_in_words($post->created_at) . " ago", array("#show", 'id' => $post->id)); ?> </span> <?php if ($post->creator->has_avatar()) { ?> <div class="forum-avatar-container"> <?php echo avatar($post->creator, $post->id); ?> </div> <?php } ?> </div> <div class="content"> <?php if ($post->is_parent) { ?> <h6><?php echo h($post->title); ?> </h6> <?php } else {
</span> <a name="<?php echo $comment->id; ?> " href="<?php echo url_for($comments_path . '#' . $comment->id); ?> "># </a> <br /> <span class="text_small"> by <?php echo user_link($comment->User); ?> <?php echo time_ago_in_words(strtotime($comment->created_at)); ?> ago </span> <br /> <br /> <span class="comment_body"><?php echo nl2br($comment->body); ?> </span><br /> <?php if ($sf_user->hasCredential('contributor') && isset($add_path)) { ?> <span class="text_small"><?php
<?php slot('tags', get_component('swBlogPosts', 'showTags')); ?> <?php foreach ($sw_blog_posts->getResults() as $sw_blog_post) { ?> <div class='sw_blog_post'> <h2> <?php echo link_to($sw_blog_post->getTitle(), $sw_blog_post->getUrl('sw_blog_view_post')); ?> <span class="sw_blog_post_date"><?php echo time_ago_in_words(strtotime($sw_blog_post->getCreatedAt())); ?> </span> </h2> <div class='sw_blog_post_header'> </div> <div class='sw_blog_post_abstract'> <?php echo truncate_text(strip_tags($sw_blog_post->getContent()), 200); ?> <?php echo link_to(__('link_read_more', null, 'swBlogPosts'), $sw_blog_post->getUrl('sw_blog_view_post')); ?>
<td>@<?php echo $ticket->getCreator()->getUsername(); ?> </td><?php } ?> <?php if ($showDeadline) { ?> <td title="<?php echo $ticket->getDeadline(); ?> "> ещё <?php echo ($ticket->getDeadline() ? time_ago_in_words(strtotime($ticket->getDeadline())) : 'есть время') . ($ticket->getDeadline() && strtotime($ticket->getDeadline()) < time() ? ' назад!' : ''); ?> </td><?php } ?> <?php if (!isset($dontShowApply)) { $applier = $ticket->getApplier(); ?> <td> <?php if ($applier) { ?> в работе с <?php echo date('d.m.Y H:i:s', strtotime($applier->getCreatedAt()));
<div id="stats"> <h5>Statistics</h5> <ul> <li>Id: <?php echo $post->id; ?> </li> <li>Posted: <a href="/post?tags=date%3A<?php echo date('Y-m-d', datetime_to_timestamp($post->created_at)); ?> "><?php echo time_ago_in_words(date('Y-m-d H:i:s', datetime_to_timestamp($post->created_at))); ?> ago</a> by <a href="/user/show/<?php echo $post->user_id; ?> "><?php echo $post->author; ?> </a></li> <li>Size: <?php echo $post->width, 'x', $post->height; ?> </li> <?php if ($post->source) { ?> <li>Source: <?php echo propper_source($post); ?> </li>
if ($i % 2) { echo 'class="alt"'; } ?> > <a class="btn-close" href="#" onclick="sidebarHideActivity(<?php echo $activity->getId(); ?> ); return false;">Close</a> <div class="wrap"> <p><?php echo $activity->getContent(ESC_RAW); ?> </p> <em class="time"><?php echo time_ago_in_words($activity->getCreatedAt('U')); ?> </em> </div> </li> <?php } ?> <?php /* <li class="alt"> <a class="btn-close" href="#">Close</a> <div class="wrap"> <p><a href="#">Mission #125,334</a> has been cancelled</p>
<?php use_helper('Date', 'Global'); ?> <h2><?php echo esc_entities($question->getTitle()); ?> </h2> <p><?php echo __('asked by %1% %2% ago', array('%1%' => '<strong>' . $question->getUser() . '</strong>', '%2%' => time_ago_in_words($question->getCreatedAt('U')))); ?> </p> <?php echo __('%1% askeet users are interested by this question', array('%1%' => $interested_users_pager->getNbResults())); ?> <ul> <?php foreach ($interested_users_pager->getResults() as $interested_user) { ?> <li><?php echo link_to($interested_user->__toString(), '@user_profile?nickname=' . $interested_user->getNickname()); ?> </li> <?php } ?> </ul> <div id="users_pager">
/** * Creates a nicer date display using an abbreviation tag. * * @package Reditype * @subpackage helper * @author Piers Warmers <*****@*****.**> * @param string $date_string * @param string $culture * @return string */ function time_ago_in_words_abbr($date_string, $culture = 'en') { return sprintf('<abbr title="%s">%s %s</abbr>', format_date($date_string, 'U', $culture), time_ago_in_words(strtotime($date_string)), __('ago')); }
<th colspan="2">Member Stats</th> </tr> <tr><td>Kanji Count :</td><td><?php echo escape_once($kanji_count); ?> </td></tr> <tr><td>Total Reviews :</td><td><?php echo escape_once($total_reviews); ?> </td></tr> <tr><td>Joined :</td><td><?php echo date('j M Y', $user['ts_joindate']); ?> </td></tr> <tr><td>Last Login:</td><td><?php echo time_ago_in_words($user['ts_lastlogin'], true); ?> ago</td></tr> </table> <?php if ($forum_uid && $self_account) { ?> <p><a href="<?php echo coreConfig::get('app_forum_url'); ?> /profile.php?id=<?php echo $forum_uid; ?> ">Edit my RevTK Forum profile</a>.</p>
} ?> <?php echo link_to($branch['name'], 'default/fileList', array('query_string' => 'branch=' . $branch['id'])); ?> </h3><br /> <span title="<?php echo $branch['lastCommitDesc']; ?> " class="commit_desc tooltip"><?php echo stringUtils::shorten(stringUtils::trimTicketInfos($branch['lastCommitDesc']), 105); ?> </span> </td> <td class="branch_ago"><?php echo time_ago_in_words($branch['created']); ?> ago</td> <td class="branch_infos"> <?php echo $branch['total'] . ' files'; ?> <?php if ($branch['added']) { ?> <span class="added tooltip" title="<?php echo $branch['added'] . ' added file(s)'; ?> "><?php echo $branch['added'] . '+'; ?>
?> <?php echo __('<span class="label label-important">%LABEL%</span>', array('%LABEL%' => $activity->getLabel())); ?> <?php break; ?> <?php default: ?> <?php echo __('<span class="label %label%">%LABEL%</span>', array('%label%' => strtolower($activity->getLabel()), '%LABEL%' => $activity->getLabel())); ?> <?php } // endswitch; ?> <?php echo __('%time_ago% ago', array("%time_ago%" => time_ago_in_words($activity->getCreatedAt('U')))); ?> </li> <?php $is_first = false; ?> <?php } ?> </ul> </section>
</strong> </td> <td class="padded" style="width: 50px;"><?php echo count(explode(",", $map->entity_ids)); ?> </td> <td class="padded" style="width: 50px;"><?php echo count(explode(",", $map->rel_ids)); ?> </td> <td class="padded" style="width: 100px;"><?php echo user_link($map->getUser()); ?> </td> <td class="padded" style="width: 200px;"><?php echo time_ago_in_words(strtotime($map->updated_at)); ?> ago</td> <td class="padded" stype="width: 100px;"> <?php if ($sf_user->hasCredential('admin')) { ?> <?php echo link_to('remove', 'map/delete?id=' . $map->id, array('post' => true, 'confirm' => 'Are you sure?')); ?> <?php } ?> </td> </tr> <?php
?> <div id="map_description"><?php echo $map["description"]; ?> </div> <?php include_partial('global/map_and_controls', array('id' => $map["id"])); ?> saved by <?php echo user_link($user); ?> <?php echo time_ago_in_words(strtotime($map['updated_at'])); ?> ago <script> var data = <?php echo $map["data"]; ?> ; var width = <?php echo $map["width"] ? $map["width"] : sfConfig::get("app_netmap_default_width"); ?> ; var height = <?php echo $map["height"] ? $map["height"] : sfConfig::get("app_netmap_default_height"); ?>
if ($note['is_private']) { ?> <?php echo image_tag('system/lock.png'); ?> <?php } ?> <?php echo NoteTable::prepareBodyForDisplay($note['body']); ?> <div class="note_full_date"> <?php echo link_to(time_ago_in_words(strtotime($note['created_at'])) . ' ago', NoteTable::getInternalUrl($note)); ?> <?php if (NoteTable::hasNonUsNetworks($note)) { ?> <?php $networks = NoteTable::getNetworksArray($note); ?> <?php $networkLinks = array(); ?> <?php foreach ($networks as $network) { ?> <?php
<article class="fortune-comment" id="c_<?php echo $comment['id']; ?> "> <blockquote> <?php echo $comment['content']; ?> </blockquote> <p> Posted by <?php echo $comment['author']; ?> <?php echo time_ago_in_words(strtotime($comment['created_at'])); ?> ago </p> </article> <?php } ?> <?php } else { ?> <p>No comment yet</p> <?php } ?> </div>
<?php use_helper('LsText', 'Date'); ?> <tr class="hover" style="vertical-align: top;"> <td><?php echo $object['name_first'] . ' ' . $object['name_last']; ?> </td> <td><?php echo $object['email']; ?> </td> <td><?php echo $object['num_ips']; ?> </td> <td><?php echo time_ago_in_words(strtotime($object['last_request'])); ?> ago</td> <td><?php echo link_to($object['num_requests'] . ' requests', 'api/log?user_id=' . $object['id']); ?> </td> </tr>
<?php } else { ?> <h6><?php echo h($comment->pretty_author()); ?> </h6> <?php } ?> <span class="date" title="Posted at <?php //echo $comment->created_at.strftime('%c') ?> "> <?php echo link_to(time_ago_in_words($comment->created_at) . " ago", array('post#show', 'id' => $comment->post_id, 'anchor' => "c{$comment->id}")); ?> </span> <?php if (2 === 3) { //if not translated_from_languages.empty? then ?> <span class="translated-notice">translated</span> <?php } ?> <?php if ($comment->user and $comment->user->has_avatar()) { ?> <?php Comment::avatar_post_reg($comment->user->avatar_post);
<?php use_helper('LsText', 'Date'); ?> <tr class="hover" style="vertical-align: top;"> <td><?php echo time_ago_in_words(strtotime($object['created_at'])); ?> ago</td> <td><?php echo $object['name_first'] . ' ' . $object['name_last']; ?> </td> <td><?php echo $object['email']; ?> </td> <td><?php echo $object['reason']; ?> </td> <td><?php echo link_to('approve', 'api/approveUser?id=' . $object['id'], 'post=true'); ?> </td> </tr>
} else { ?> <em><small><?php echo __('No version comment'); ?> </small></em> <?php } ?> </dt> <?php $is_first = false; ?> <dd class="item-information"> <?php echo __('%time_ago% ago', array("%time_ago%" => time_ago_in_words($version->getVersionCreatedAt('U')))); ?> </dd> <?php if ($version->getVersion() > 1) { ?> <?php $diff = $object->compareVersions($version->getVersion() - 1, $version->getVersion()); foreach ($configuration->getFormFields($form, $form->isNew() ? 'new' : 'edit') as $fieldset => $fields) { ?> <?php foreach ($fields as $name => $field) { ?> <?php if (isset($diff[sfInflector::camelize($name)])) {