SID-01383: formula for "days/minutes/seconds from last update"
| Status: |
Answered |
TWiki version: |
4.1.0 |
Perl version: |
5.10 |
| Category: |
CategoryStatistics |
Server OS: |
n/a |
Last update: |
14 years ago |
Hi all,
i'm trying to build a table that shows info about the topics of my twiki, in particular i need to check if a page becomes out of date, but i didn't manage to retrieve the difference between the current date and the last upated time, i.e. the following is broken:
%CALC{"$TIMEDIFF(%DISPLAYTIME{$hou:$min:$seconds}% , %REVINFO{"$time"}%)"}%
...in the
SupportHeader of this site there is a formula that give the info i want, but seems to only works embedded in a FORMATTEDSEARCH table.
I also need to get the info of a generic topic from another topic, which is the topic where i store the info.
can anyone teach me how to work this out?
Thanks a lot
p
--
PaoloGallo - 2012-01-20
Discussion and Answer
$TIMEDIFF() expects two serial numbers, so you probably want to use
%GMTIME{$epoch}% for the first one. See
SpreadSheetPlugin,
VarGMTIME2.
--
PeterThoeny - 2012-01-23
Hi, thanks for the reply, i managed to get the info i was looking for with the following:
%SEARCH{ "^MyTopicName$" scope="topic" regex="on" nonoise="on" format="$percntCALC{$FORMATTIMEDIFF(sec, 1, $TIMEDIFF($TIME($date GMT), $TIME(), sec))}$percnt ago"}%
bye
p
--
PaoloGallo - 2012-01-30
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.