MT-SomeDays 2.0.0 »
After receiving some feedback, I did some rewriting of the MTSomeDays plugin.
As the changes were somewhat extensive, and because the use of the attributes has changed slightly, I bumped the version number up to 2.0.0. I hope this doesn't break anyone's system.
Here's a quick rundown of how the tags currently work:
<MTSomeDays date="YYYYMMDD"> - displays a particular date
<MTSomeDays day="last"> - moves the date back a day
<MTSomeDays day="next"> - moves the date forward a day
<MTSomeDays day="-A"> - moves the date back A days
<MTSomeDays day="+A"> - moves the date forward A days
<MTSomeDays week="last"> - moves the date back a week
<MTSomeDays week="next"> - moves the date forward a week
<MTSomeDays week="-B"> - moves the date back B weeks
<MTSomeDays week="+B"> - moves the date forward B weeks
<MTSomeDays month="last"> - moves the date back a month
<MTSomeDays month="next"> - moves the date forward a month
<MTSomeDays month="-C"> - moves the date back C months
<MTSomeDays month="+C"> - moves the date forward C months
<MTSomeDays year="last"> - moves the date back a year
<MTSomeDays year="next"> - moves the date forward a year
<MTSomeDays year="-D"> - moves the date back D months
<MTSomeDays year="+D"> - moves the date forward D months
<MTSomeDays padding="1"> - turns on padding around the date
The offset attribute has been removed in favor of an enhanced select attribute. Also, the values to change the date have changed - precede your number with a minus (-) to move backwards and a plus (+) to move forwards. Specifying a value without a sign will surely produce unexpected results.
<MTSomeDays select="week"> - selects the entire calendar week (sun - sat)
<MTSomeDays select="month"> - selects the entire calendar month
<MTSomeDays select="year"> - selects the entire calendar year
<MTSomeDays select="-E"> - selects the previous E days, inclusive
<MTSomeDays select="+E"> - selects the next E days, inclusive
The conditional tags available within the container are still available:
<MTSDIfPadding></MTSDIfPadding> - if the day represents "padding"
<MTSDIfNoPadding></MTSDIfNoPadding> - if the day is not "padding"
<MTSDIfEntries></MTSDIfEntries> - if entries are available
<MTSDIfNoEntries></MTSDIfNoEntries> - if no entries are available
<MTSDIfToday></MTSDIfToday> - if processing date = current date
<MTSDIfNotToday></MTSDIfNotToday> - if processing date not current date
<MTSDIfSunday></MTSDIfSunday> - sunday data (dow 0)
<MTSDIfMonday></MTSDIfMonday> - monday data (dow 1)
<MTSDIfTuesday></MTSDIfTuesday> - tuesday data (dow 2)
<MTSDIfWednesday></MTSDIfWednesday> - wednesday data (dow 3)
<MTSDIfThursday></MTSDIfThursday> - thursday data (dow 4)
<MTSDIfFriday></MTSDIfFriday> - friday data (dow 5)
<MTSDIfSaturday></MTSDIfSaturday> - saturday data (dow 6)
<MTSDIfNotSunday></MTSDIfNotSunday> - not sunday data (dow not 0)
<MTSDIfNotMonday></MTSDIfNotMonday> - not monday data (dow not 1)
<MTSDIfNotTuesday></MTSDIfNotTuesday> - not tuesday data (dow not 2)
<MTSDIfNotWednesday></MTSDIfNotWednesday> - not wednesday data (dow not 3)
<MTSDIfNotThursday></MTSDIfNotThursday> - not thursday data (dow not 4)
<MTSDIfNotFriday></MTSDIfNotFriday> - not friday data (dow not 5)
<MTSDIfNotSaturday></MTSDIfNotSaturday> - not saturday data (dow not 6)
<MTSDIfWeekday></MTSDIfWeekday> - weekday (dow 1-5)
<MTSDIfWeekend></MTSDIfWeekend> - weekday (dow 0 or 6)
<MTSDIfEvenMonth></MTSDIfEvenMonth> - month 2, 4, 6, 8, 10, 12
<MTSDIfOddMonth></MTSDIfOddMonth> - month 1, 3, 5, 7, 9, 11
Finally, the data tags are still available as well:
<$MTSDEndDate$> - the ending date of your processing range
<$MTSDStartDate$> - the beginning date of your processing range
<$MTSDWorkDate$> - the current date being processed
<$MTSDDayOfWeek$> - the day of week (0-6) of the date being processed
Because of the length of this entry, I have not added any additional documentation here. I've updated the documentation in the archive if you need any assistance. The earlier entries may prove helpful too: 1.0.0, 1.1.0, 1.2.0, 1.3.0. As time permits, I'll be putting together a better page with information and examples, too - just haven't had the chance as yet.
Update: I forgot an "s" in the download link. Should work now. Sorry about that.
Update: Fixed the day attribute in the documentation.

Comments (6)
Archive link is broken
Posted by Crys | September 14, 2003 5:38 PM
I forgot an "s" in the link. Sorry about that. Should work fine now.
Posted by Chad Everett | September 14, 2003 5:40 PM
Found it:
http://www.cxliv.org/static/downloads/SomeDays.zip
Posted by Crys | September 14, 2003 5:41 PM
Minor typo, but could confuse some:
Your first example is for DAYS but you are using a WEEK selector. I am assuming the correct word is the singular, ie day="-1"
Keep up the great work, thanks for the super-quick release...
Posted by -lc- | September 14, 2003 6:20 PM
S'what I get for trying to speed things up by copying them from one place to another. :)
Okay, I think all the typos are corrected, the documentation is updated and all the links are right. I sure hope so, anyway. Thanks for keeping me on my toes. Let me know if you find anything else that I missed!
Posted by Chad Everett | September 14, 2003 6:36 PM
I can't get it to do what I want. Trying to make a list of all entries older than the current week. (Basically emulating the standard offset attribute from MTEntries but with date instead of lastn.)
What I have is day="-7" select="-60" . So, it should do entries posted between 67 days ago and 7 days ago. Instead it doesn't seem to have any effect, just shows all entries. What am I missing?
Posted by Aaron | September 15, 2003 12:28 PM