summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndreas Gohr <gohr@cosmocode.de>2009-10-07 15:36:14 +0200
committerAndreas Gohr <gohr@cosmocode.de>2009-10-07 15:36:14 +0200
commitf22635779b10fe3735a11bc1af5c88653e580534 (patch)
tree03322ac39a0a7a644340b45417125ea4c8275b51 /lib
parentc57e365ef97272cc08601374e4de2f5bcd614335 (diff)
downloadrpg-f22635779b10fe3735a11bc1af5c88653e580534.tar.gz
rpg-f22635779b10fe3735a11bc1af5c88653e580534.tar.bz2
New dformat() function for fuzzy date support
Ignore-this: 7193cd788fee2c05a9068bf6edd5dc17 It is now possible to use the %f placeholder in $conf['dformat'] to add a fuzzy age string. Template developers and plugin authors should replace their strftime + $conf['dformat'] calls with calls to the new dformat() function. Example: %Y/%m/%d %H:%M (%f) produces dates like this: 2009/09/16 10:36 (3 weeks ago) darcs-hash:20091007133614-6e07b-677108d1b43928ef8fd886813e43514507b5e073.gz
Diffstat (limited to 'lib')
-rw-r--r--lib/exe/ajax.php2
-rw-r--r--lib/tpl/default/detail.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/exe/ajax.php b/lib/exe/ajax.php
index 4d9a8105a..4618abd71 100644
--- a/lib/exe/ajax.php
+++ b/lib/exe/ajax.php
@@ -152,7 +152,7 @@ function ajax_lock(){
);
$cname = getCacheName($draft['client'].$id,'.draft');
if(io_saveFile($cname,serialize($draft))){
- echo $lang['draftdate'].' '.strftime($conf['dformat']);
+ echo $lang['draftdate'].' '.dformat();
}
}
diff --git a/lib/tpl/default/detail.php b/lib/tpl/default/detail.php
index 765358568..4f42b116e 100644
--- a/lib/tpl/default/detail.php
+++ b/lib/tpl/default/detail.php
@@ -53,7 +53,7 @@ if (!defined('DOKU_INC')) die();
<dl class="img_tags">
<?php
$t = tpl_img_getTag('Date.EarliestTime');
- if($t) print '<dt>'.$lang['img_date'].':</dt><dd>'.strftime($conf['dformat'],$t).'</dd>';
+ if($t) print '<dt>'.$lang['img_date'].':</dt><dd>'.dformat($t).'</dd>';
$t = tpl_img_getTag('File.Name');
if($t) print '<dt>'.$lang['img_fname'].':</dt><dd>'.hsc($t).'</dd>';