[pmwiki-users] pagelist to return pages older than date, but date down to seconds (?) possible?

Petko Yotov 5ko at 5ko.fr
Thu Nov 17 15:15:23 CST 2016


On 2016-11-17 21:30, ccox at endlessnow.com wrote:
> I know you can specify an if=date and retrieve pages from pagelist
> less than a date down to a day (..20161117), but what if I need to go
> lower, down to seconds?
> 
> Something like ..20161117T110000
> 
> Can this be done?

Looking at DRange(), the above format is supposed work, also 
20161117T11:00:00 or 20161117T11.00.00 (seconds optional).

The following appears to work on pmwiki.org:

(:if date ..20161117T110000 now:)
it is before 20161117T110000.
(:if date ..20161117T120000 now:)
it is before 20161117T120000.
(:if date ..20161117T130000 now:)
it is before 20161117T130000.
(:if date ..20161117T140000 now:)
it is before 20161117T140000.
(:if date ..20161117T150000 now:)
it is before 20161117T150000.
(:if date ..20161117T160000 now:)
it is before 20161117T160000.
(:if date ..20161117T170000 now:)
it is before 20161117T170000.
(:if date ..20161117T180000 now:)
it is before 20161117T180000.
(:if date ..20161117T190000 now:)
it is before 20161117T190000.
(:if:)

Right now it shows "it is before 20161117T160000. it is before 
20161117T170000. it is before 20161117T180000. it is before 
20161117T190000."

So the "date" conditional does support the format you have. If it 
doesn't work as you'd expect, note that it uses the timezone of the 
server, not the browser, and check if the date that is being tested is 
well recognized by strftime().

Petko

---
Change log     :  http://www.pmwiki.org/wiki/PmWiki/ChangeLog
Release notes  :  http://www.pmwiki.org/wiki/PmWiki/ReleaseNotes
If you upgrade :  http://www.pmwiki.org/wiki/PmWiki/Upgrades



More information about the pmwiki-users mailing list