Hi Skeeve I think the idea of a cut-off point for the recent tab is a very good one. I'm not sure whether it's best for users to specify the date by nominating a tiddler or by directly specifying the cut-off date. I'll take the discussion about the new filters over to GitHub.
Many thanks, Jeremy. On Fri, May 30, 2014 at 3:44 AM, Stephan Hradek <[email protected]> wrote: > I just took a look at TW 5.0.12 and I think what you want isn't yet > possible. > > In order to be able to have that we would need a filter function, similar > to "sameday" called (e.g.) "afterday". > > I think then in "$:/snippets/recentchanges" we need to change: > > <$list > filter="[!is[system]has[modified]!sort[modified]limit[100]eachday[modified]]"> > > to > > <$list filter="[!is[system]has[modified]afterday{Version > History!!modified}!sort[modified]limit[100]eachday[modified]]"> > > This would be the "$:/core/modules/filters/afterday.js" filter required. > > I just had a quick test and it seems to work. > > /*\ > title: $:/core/modules/filters/afterday.js > type: application/javascript > module-type: filteroperator > > Filter operator that selects tiddlers with a modified date field on the same > day as the provided value. > > \*/ > (function(){ > > /*jslint node: true, browser: true */ > /*global $tw: false */ > "use strict"; > > /* > Export our filter function > */ > exports.afterday = function(source,operator,options) { > var results = [], > fieldName = operator.suffix || "modified", > targetDate = (new > Date($tw.utils.parseDate(operator.operand))).setHours(0,0,0,0); > // Function to convert a date/time to a date integer > var isAfterDay = function(dateField) { > return (new Date(dateField)).setHours(0,0,0,0) > > targetDate; > }; > source(function(tiddler,title) { > if(tiddler && tiddler.fields[fieldName]) { > if(isAfterDay(tiddler.fields[fieldName])) { > results.push(title); > } > } > }); > return results; > }; > > })(); > > > > > -- > You received this message because you are subscribed to the Google Groups > "TiddlyWiki" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/tiddlywiki. > For more options, visit https://groups.google.com/d/optout. > -- Jeremy Ruston mailto:[email protected] -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/d/optout.

