I’m trying to create some relevance to run a task dependant on where in a range of dates we are.
I need to select all the days of the current month which are not a Friday, Saturday or Sunday, that are also not in the first 3 working days of the month. Of these valid days, I need to calculate which of these days we are currently on. For instance, assuming the month is Feb 2011 … the valid days would be 7th, 8th, 9th 10th, 14th, 15th, 16th, 17th, 21st, 22nd, 23rd, 24th and 28th. On the 16th of Feb, I’d be looking to return 7 as it is the 7th valid day.
There doesn’t seem to be any way of handling multiple dates, “dates whose (day_of_week of it != “Friday”) of current month” or something like that?
Very tricky… I can look at this later, but this will get you started:
q: (current month & it & current year) whose (day_of_week of it != saturday AND day_of_week of it != Sunday) of days_of_month (1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17;18;19;20;21;22;23;24;25;26;27;28;29;30;31) whose (exists (current month & it & current year) )
A: Tue, 01 Feb 2011
A: Wed, 02 Feb 2011
A: Thu, 03 Feb 2011
A: Fri, 04 Feb 2011
A: Mon, 07 Feb 2011
A: Tue, 08 Feb 2011
A: Wed, 09 Feb 2011
A: Thu, 10 Feb 2011
A: Fri, 11 Feb 2011
A: Mon, 14 Feb 2011
A: Tue, 15 Feb 2011
A: Wed, 16 Feb 2011
A: Thu, 17 Feb 2011
A: Fri, 18 Feb 2011
A: Mon, 21 Feb 2011
A: Tue, 22 Feb 2011
A: Wed, 23 Feb 2011
A: Thu, 24 Feb 2011
A: Fri, 25 Feb 2011
A: Mon, 28 Feb 2011