Difference between revisions of "ITrack/Date Fields"
(Addition of information on years, the keywords "first", "second", etc... and International Date Format.) |
m (Fixed misspelling of "international") |
||
Line 6: | Line 6: | ||
Absolute dates are precise dates. ITrack supports two formats: | Absolute dates are precise dates. ITrack supports two formats: | ||
* American Format - This is the standard American 'mm/dd/yyyy' format. ITrack supports just typing in the month/day part or even just the day part. The year can be entered as a two digit or four digit number. If only four digits are entered, it is treated as a year. | * American Format - This is the standard American 'mm/dd/yyyy' format. ITrack supports just typing in the month/day part or even just the day part. The year can be entered as a two digit or four digit number. If only four digits are entered, it is treated as a year. | ||
* | * International Format - This is a format used by many nations 'dd.mm.yyyy'. Years may be two or four digits. If only four digits are entered, it is treated as a year. | ||
* SQL Format - This is a the commonly used computer format 'yyyy-mm-dd'. ITrack supports just typing in the month-day part of even just the day part. The year can be entered as a two digit or four digit number. If only four digits are entered, it is treated as a year. | * SQL Format - This is a the commonly used computer format 'yyyy-mm-dd'. ITrack supports just typing in the month-day part of even just the day part. The year can be entered as a two digit or four digit number. If only four digits are entered, it is treated as a year. | ||
Revision as of 12:26, 20 November 2008
Most places in ITrack where dates need to be entered there exist special Date Controls. These objects have a drop down calendar and are specially designed to help people view dates visually. Some places, however, there is either little room for a large date control or for other design reasons a simple edit box is used. Even though the edit boxes aren't as visually appealing, they are still very powerful and efficient.
Date edits in ITrack can parse a large number of possible formats.
Absolute Dates
Absolute dates are precise dates. ITrack supports two formats:
- American Format - This is the standard American 'mm/dd/yyyy' format. ITrack supports just typing in the month/day part or even just the day part. The year can be entered as a two digit or four digit number. If only four digits are entered, it is treated as a year.
- International Format - This is a format used by many nations 'dd.mm.yyyy'. Years may be two or four digits. If only four digits are entered, it is treated as a year.
- SQL Format - This is a the commonly used computer format 'yyyy-mm-dd'. ITrack supports just typing in the month-day part of even just the day part. The year can be entered as a two digit or four digit number. If only four digits are entered, it is treated as a year.
Relative Dates
The flexibility of the date system is greatly enhanced by the allowance of relative dates. A relative date can be entered on its own (in which case it will be relative to the current date) or it can be inputted following an absolute date. Relative dates can be in many formats:
- "<+/->n <period>" - The plus or minus tells whether to add or subtrack, the number n represents an integer, and the <period> can be any of "days", "weeks", "months", or "years" or simply their first letters "d", "w", "m", and "y". The period is case insensitive and the pluralization is optional. Some examples:
- "+5 weeks" - Five weeks from now
- "-1 year" - Last year
- "+12w" - Twelve weeks from now
- "12/25/1985 +60d" - Sixty days after Christmas in 1985
- "3 -7" - Seven days before the third of this month
- "[<modifier>] <day of week>" - By day of the week. <modifier> is optional and can be either a plus or minus followed by a number or one of the words "this", "last", of "next" and is case insensitive. <day of week> can be "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" or their usual shorter forms "Su(n)", "Mo(n)", "Tu(es)", "We(d)", "Th(urs)", "Fr(i)", "Sa(t)". It is case insensitive. If a plus or minus and a number is placed before the day of the week then ITrack interprets it as that man <day of week>s ago. If no number is used then ITrack assumes that the day listed is the day of the current week (even if it has passed or is yet to come). Weeks in ITrack begin on Sunday and end on Saturday. Some examples:
- "Th" - The Thursday of this week.
- "-1 Friday" - The Friday of the previous week.
- "next sat" - The Saturday of the next week
- "4/1 Mon" - The Monday in the week of April first.
- "1976-06-04 Sunday" - The Sunday of the week 200 years after the the United States declared their independence.
- "<special>" There are a few special strings that ITrack recognizes. While there is generally no good reason to, they can be appended to absolute dates. They are case insensitive:
- "today" - Today
- "tomorrow" - Tomorrow
- "yesterday" - Yesterday