Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

"Today" condition based on filed date

I just realised that the (today) condition is based on the filed date. How can I do the same thing based on the modified date?

For example, I have the following script:

{$foreach x in (and(after today-1)(not(filename "index"))(not(author ""))) SortDescendBy .modifieddate $}

{$x.headline$}

[{$ setDateTimeFormat "English" "MM/dd/yy" "hh:mm" $}{$x.modifieddate$}] {$x.teaser$} [more]
{$next$}

This code is supposed to display the articles which were modified today, doesn't work because "today" (per the help) "Returns all articles which were filed today, according to the computer's system clock."

How can I display the articles which were modified today?
Thanks.

David Watts
Tuesday, October 07, 2003

That's a good (bad) one. I've never gotten into the modified date habit having started with version 1. I've always used the filed date as the revision date, changing it when I revise an article. I see now that using modified date would have caused me trouble in one of my sites.

tk
Tuesday, October 07, 2003

I had a similar problem with one of my sites. In the end, I just set up the loop to display links to the most recent 10 pages, sorted by modifiedDate descending.

Darren Collins
Tuesday, October 07, 2003

Thanks for the replies. I'd therefore like to request a change to the function of the (Today) condition. From:

"Returns all articles which were filed today, according to the computer's system clock."

To:

"Returns all articles which were filed or modified today, according to the computer's system clock."

David.

David Watts
Wednesday, October 08, 2003

or two variables: todayFiledDate and todayModifiedDate

Amos
Wednesday, October 08, 2003

Or FiledToday and ModifiedToday.

Darren Collins
Wednesday, October 08, 2003

*  Recent Topics

*  Fog Creek Home