Date Attributes

Tinderbox Icon

Date

A date and time string. Dates can be added/subtracted/compared in mathematical fashion, as per number data types. The resulting 'string' can be formatted by means of date format codes. If no default value is specified, a Date type defaults to a value of never. If a date is specified but not a time, time always defaults to '00:00' (visual format may vary by locale - e,g, in the use of the colon delimiter).

Time is used in date comparisons except when the = operator is used. Also see Basic Comparison Operators for agents; the same rules hold true for data comparisons in action code expressions.

Tinderbox also recognises today, yesterday, tomorrow, day, week, month and year as date placeholders. Constructions like 'yesterday + 1 week' or 'tomorrow + 1 year' are also possible. The 'now' placeholder can be used as an alternate for 'today'. Use of these placeholders won't result in a "00:00" time stamp as with manually input dates but rather the current time as the placeholders are effectively N days offset backwards or forwards from 'now'.

Dates are recognised in with slash '1/7/05' and the Continental format with periods, e.g. '1.7.05'.

Tinderbox handles dates, in attributes & expressions, from before 1 January 1904. Those wishing to use such dates should use the Formats pane of the International pane (Formats tab) of the Mac OS System Preferences and set four-digit year numbers. To do this (for a region), on the Formats tab, click the the 'Customize...' button to the right of the example dates. The 'Show' pop-up is most likely set to 'Short' - leave it as that. In the white text box below click on to year; you will see a drop-down menu that will allow you to choose either 2-digit or 4-digit dates, select the four-digit date. US users should note the default US setting for "short" date formats is to display 2-digit years, i.e. 10/3/65 (for 1765, 1865, etc.).

Tinderbox XML documents store dates using ISO 8601 format. Previously, dates were stored as American dates; this caused some conflicts in Finnish. Tinderbox also recognises date strings entered as key attributes or converted from strings in actions when in the ISO 8601 format (e.g. 2008-11-20 16:55:01).

Two dates may be subtracted with a result in days even if the result is a string. This helps with tasks like setting DisplayExpression.

Tinderbox offers numerous date formats.

Attributes of the date data type are listed below.


Up: Attribute Data Types
Previous: Boolean Attributes  Next: Set Attributes 

[Last updated: 1 Dec 2008]

Google search aTbRef for:  

Licensed under Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
[See aTbRef CC licence Attribution/Waiver info info]

Creative Commons License

Made with Tinderbox