This version is out of date, covering development as far as v4.2.5. It is maintained here only for inbound reference links from elsewhere.
Jump to the current version of aTbRef.
|A Tinderbox Reference File : Import/Export/Formatting : Date Formats|
Tinderbox offers numerous date formats. An example date Tue, 29 Apr 2003 14:32:18 - 0500 is used to show the following various format strings below. Note below that the colons after each (bolded) code are not part of that format code but just a divider from the text that follows it.
From v4.1.0, dates before 1 January 1904 are supported - see more.
L : local date/time, in long format, using the system format settings (example: Tuesday, April 29, 2003.)
l : local date, in short format, using the system format settings (example: 4-29-03)
* : date/time in RFC 822 format (example: Tue, 17 Jan 2006 15:47:56 +0000)
= : date in ISO 8601 format (example: 2006-01-17T15:27:08+00:00)
Parts of Dates:-
d : day of the month - not zero-padded (example: '9' - and not '09')
D : formats the date of the month as a two digit number, with a leading zero as required. 01-31[added v3.5.0]
m : number of month - not zero-padded (example: '4' - and not '04')
y : 4 digit year (example: '2003'). [2 digits on some systems]
Y : 2 digit year. Year 2006 is rendered as '06'. [added v3.5.0]
w : abbreviation of weekday (example: Tue)
W : name of weekday (example: Tuesday)
M : abbreviation of month (example: Apr)
M0 : formats the month as a two digit number, with a leading zero as required: 01-12. The second character is zero not the letter 'o'. [added v3.5.0]
MM : name of month (example: April)
Parts of Times:-
t : time, in local format (example: 2:32 pm)
h : hour of the day on a 24-hour clock (example: '13' in 13:39). Note: As of v2.5.0, this is zero-padded for single digits when used with dates, i.e. "05" instead of "5" - thus 'h', 'mm' and 's' all render as 2 digits.
H : hour of the day on a 12-hour clock (example: '1'1 in 1:39). Use with 'p' to show AM or PM suffix.
mm : minute of the hour (example: '05' for five minutes after the hour)
s : second of minute (example: '02', '34')
p : AM or PM, uppercase (example: 'AM')
Escaping any of above as literals:-
\ : includes the next character literally, even if it has a special meaning (example "\dd \mm \yY" gives 'd05 m11 y08').
Any other character includes the character. Thus, the format string "h:mm:s" gives output of "04:45:27".
|Previous: Copying/Moving text within Tinderbox||Next: Dragging a URL from web browser|
Licensed under Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
[See aTbRef CC licence Attribution/Waiver info info]