Dates and Tinderbox
Tinderbox automatically keeps track of two dates: Created (the date and time when a note was first made), and Modified (the date and time when the note was most recently changed). You can create your own date attributes, too; for example, Published might be the date when a note was first added to the public version of your Web site.
Tinderbox lets you enter dates easily. In addition to conventional dates and times, you can use handy keywords like "today", "tomorrow", or (next) "Wednesday". You can also write expressions, like "today+1 week".
Agents can use dates to good effect. A container for weblog items, for example, might automatically timestamp a note whenever it's added, whether freshly-created or moved from another place. Or an agent could collect all news items whose ReleaseDate has already arrived, but not items whose ReleaseDate is still in the future.
When exporting dates to weblogs or creating reports for your management, Tinderbox offers great flexibility in date formatting. To include any date, simply add the placeholder ^Get() to your template:
To format dates, add a second argument to ^Get:
where "format-string" describes the way you want the date to appear.
Format strings let you present dates and times in exactly the way you wish. They can appear in your language or in English, in whatever style you prefer.
|L||Monday, March 25, 2002 (local time, in long format, using the system format settings|
|l||3-25-2002 (local time, in short format, using the system format settings|
|d||25 (day of month)|
|m||3 (number of month)|
|M||Mar (abbreviation of month)|
|MM||March (name of month)|
|w||Mon (abbreviation of weekday)|
|t||2:32 pm (time, in local format)|
|*||RFC-822 internet formatted time|
|\||includes the following character literally, even if it has a special meaning|
|any other character||include the character|
Tinderbox also provides a variety of convenient date conversion and manipulation tools. In actions and rules, you can use format(theDate,formatString) to convert a date to a formatted string. date(theString) constructs dates from textual expressions. days(date_1,date_2) calculates the number of days between two dates. Other functions let you extract the date, month, or year from a date.
Upgrades from any previous version of Tinderbox are just $98.