[pmwiki-users] Q: Time comparing
Jiri Hladůvka / OBUTEX
admin at obutex.com
Tue Jul 31 05:48:33 CDT 2007
Hi list,
I have a page text variable "Atime" with time value formated as
YYYYMMDD-HH:MM:SS
I need to set
- red text color if "Atime" is between {(ftime "now")} and {(ftime
"now -1 hour")}
- yellow text color if "Atime" is between {(ftime "now")} and
{(ftime "now -12 hours")}
- black (default) text color for each other case
I played in my sandbox with various forms of (:if date ... but I could
not make it work:
(:if date {(ftime "{$:Atime}" )} {(ftime "now -1 hour")}..{(ftime
"now")}:)
this time is within 1 hour
(:ifend:)
Would someone like to show me how to make the condition?
I can change the time format in the Atime if necessary.
Thanks,
Jiri
--
OBUTEX s.r.o
Ing.Jiří Hladůvka
Zlatovská 22
911 01 Trenčín
tel.: +421 (0)32 6587000
mailto:admin at obutex.com
http://www.obutex.com
More information about the pmwiki-users
mailing list