summaryrefslogtreecommitdiffstats
path: root/src/docs/formatting.html
blob: e912e6e742c6754aa1d421bfe0c41600246e8f08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<!-- ---------------------------------------------- -->
<!-- ---------------------------------------------- -->

<div id="Formatting" class="section">
	<h2>Formatting</h2>

	<p>Formatting your date/time uses special tokens inside a string.  The following are the tokens allowed and their meaning.</p>
	
	<dl class="dl-formatting">
		<dt>u</dt><dd>Unix timestamp (seconds)</dd>
		<!-- <dt>uu</dt><dd>Unix timestamp (seconds with milliseconds behind decimal)</dd>
		<dt>uuu</dt><dd>Unix timestamp (milliseconds)</dd> -->
		<dt>yy</dt><dd>Two digit year</dd>
		<dt>yyyy</dt><dd>Four digit year</dd>
		<dt>M</dt><dd>Month with no leading 0</dd>
		<dt>MM</dt><dd>Month with leading 0</dd>
		<dt>MMM</dt><dd>Month name abbreviation as defined in i18n</dd>
		<dt>MMMM</dt><dd>Month name as defined in i18n</dd>
		<dt>d</dt><dd>Day with no leading 0</dd>
		<dt>dd</dt><dd>Day with leading 0</dd>
		<dt>ddd</dt><dd>Day name abbreviation as defined in i18n</dd>
		<dt>dddd</dt><dd>Day name as defined in i18n</dd>
		<dt>HH</dt><dd>Hour with leading 0 (24 hour)</dd>
		<dt>h</dt><dd>Hour with no leading 0 (12 hour)</dd>
		<dt>hh</dt><dd>Hour with leading 0 (12 hour)</dd>
		<dt>m</dt><dd>Minute with no leading 0</dd>
		<dt>mm</dt><dd>Minute with leading 0</dd>
		<dt>s</dt><dd>Second with no leading 0</dd>
		<dt>ss</dt><dd>Second with leading 0</dd>
		<dt>l</dt><dd>Milliseconds always with leading 0</dd>
		<dt>c</dt><dd>Microseconds always with leading 0</dd>
		<dt>t</dt><dd>a or p for AM/PM</dd>
		<dt>T</dt><dd>A or P for AM/PM</dd>
		<dt>tt</dt><dd>am or pm for AM/PM</dd>
		<dt>TT</dt><dd>AM or PM for AM/PM</dd>
		<dt>z</dt><dd>Timezone as defined by timezoneList</dd>
		<dt>zz</dt><dd>Timezone as defined by timezoneList, but in Iso 8601 format (+04:45)</dd>
		<dt>zzz</dt><dd>Timezone as defined by i18n timezone names. (You must define these)</dd>
		<dt>'...'</dt><dd>Literal text (Uses single quotes)</dd>
	</dl>

</div>