|
|
|
<date/>
Provided by module: Tags: RXML tags
Inserts the time and date. Does not require attributes.
<date/> |
17:01, den 28 maj 2018 |
Attributes
- unix-time="number of seconds"
-
Display this time instead of the current. The time is taken as a
unix timestamp (i.e. the number of seconds since 00:00:00 Jan 1 1970
UTC).
<date unix-time='946684800'/> |
01:00, den 1 januari 2000 |
- http-time="http time stamp"
-
Display this time instead of the current. This attribute uses the
specified http-time, instead of the current time.
All three http-time formats are supported:
<p>RFC 822, updated by RFC 1123:
<date http-time='Sun, 06 Nov 1994 08:49:37 GMT'/></p>
<p>RFC 850, obsoleted by RFC 1036:
<date http-time='Sunday, 06-Nov-94 08:49:37 GMT' /></p>
<p>ANSI C's asctime() format:
<date http-time='Sun Nov 6 08:49:37 1994' /></p> |
RFC 822, updated by RFC 1123:
09:49, den 6 november 1994
RFC 850, obsoleted by RFC 1036:
09:49, den 6 november 1994
ANSI C's asctime() format:
08:49, den 6 november 1994 |
- iso-time="{yyyy-mm-dd, yyyy-mm-dd hh:mm, yyyy-mm-dd hh:mm:ss}"
-
Display this time instead of the current. This attribute uses the specified
ISO 8601 time as the starting time, instead of the current time. The character
between the date and the time can be either " " (space) or "T" (the letter T).
<date iso-time='2002-09-03 16:06'/> |
16:06, den 3 september 2002 |
- timezone="{local, GMT}" (local)
-
Display the time from another timezone.
- to-timezone="{local, GMT, Europe/Stockholm, ...}" (local)
-
Display the time in another timezone.
- years="number"
-
Add this number of years to the result.
<date date='' years='2'/> |
den 28 maj 2020 |
- months="number"
-
Add this number of months to the result.
<date date='' months='2'/> |
den 28 juli 2018 |
- weeks="number"
-
Add this number of weeks to the result.
<date date='' weeks='2'/> |
den 11 juni 2018 |
- days="number"
-
Add this number of days to the result.
- hours="number"
-
Add this number of hours to the result.
<date time='' hours='2' type='iso'/> |
19:01:14 |
- beats="number"
-
Add this number of beats to the result.
<date time='' beats='10' type='iso'/> |
17:15:38 |
- minutes="number"
-
Add this number of minutes to the result.
- seconds="number"
-
Add this number of seconds to the result.
- adjust="number"
-
Add this number of seconds to the result.
- brief
-
Show in brief format.
<date brief=''/> |
i dag, klockan 17:01 |
- time
-
Show only time.
- date
-
Show only date.
<date date=''/> |
den 28 maj 2018 |
- type="{number, ordered, string, discordian, http, iso, stardate, unix}"
-
Defines in which format the date should be displayed in.
The following types are only useful together with the "part"
attribute:
type=number
|
<date part='day' type='number'/> |
2 |
|
type=ordered
|
<date part='day' type='ordered'/> |
2:a |
|
type=string
|
<date part='day' type='string'/> |
måndag |
|
The following types are only useful without the "part"
attribute:
type=discordian
|
<date type='discordian'/><br/>
<date type='discordian' year='' holiday=''/> |
Pungenday, the 2nd day of Confusion
Pungenday, the 2nd day of Confusion in the YOLD of 3184 |
|
type=http
|
<date type='http'/> |
Mon, 28 May 2018 15:01:14 GMT |
|
type=iso
|
<date type='iso' time=''/><br/>
<date type='iso' date=''/><br/>
<date type='iso'/> |
17:01:14
2018-05-28
2018-05-28T17:01:14 |
|
type=stardate
|
<date type='stardate' prec='5'/> |
43246.30781 |
|
type=unix
|
<date type='unix'/> |
1527519674 |
|
'http' is the format specified for use in the HTTP protocol
(useful for headers etc).
'stardate' has a separate companion attribute "prec" which sets
the precision.
- part="{year, month, day, wday, date, mday, hour, minute, second, yday, beat, week, seconds}"
-
Defines which part of the date should be displayed. Day and wday is
the same. Date and mday is the same. Yday is the day number of the
year. Seconds is unix time type. Only the types string, number and
ordered applies when the part attribute is used.
Part | Meaning |
year
|
Display the year.
<date part='year' type='number'/> |
2018 |
|
month
|
Display the month.
<date part='month' type='ordered'/> |
5:e |
|
day
|
Display the weekday, starting with Sunday.
<date part='day' type='ordered'/> |
2:a |
|
wday
|
Display the weekday. Same as 'day'.
<date part='wday' type='string'/> |
måndag |
|
date
|
Display the day of this month.
<date part='date' type='ordered'/> |
28:e |
|
mday
|
Display the number of days since the last full month.
<date part='mday' type='number'/> |
28 |
|
hour
|
Display the numbers of hours since midnight.
<date part='hour' type='ordered'/> |
17:e |
|
minute
|
Display the numbers of minutes since the last full hour.
<date part='minute' type='number'/> |
1 |
|
second
|
Display the numbers of seconds since the last full minute.
<date part='second' type='string'/> |
fjorton |
|
yday
|
Display the number of days since the first of January.
<date part='yday' type='ordered'/> |
147:e |
|
beat
|
Display the number of beats since midnight Central European
Time(CET). There is a total of 1000 beats per day. The beats system
was designed by Swatch as a
means for a universal time, without time zones and day/night
changes.
<date part='beat' type='number'/> |
@667 |
|
week
|
Display the number of the current week.
<date part='week' type='number'/> |
22 |
|
seconds
|
Display the total number of seconds this year.
<date part='seconds' type='number'/> |
1527519674 |
|
- strftime="string"
-
If this attribute is given to date, it will format the result
according to the argument string.
The ! or - (dash) modifier can be inserted to
get rid of extra field padding in any of the formatters below. For
instance, use %!m to get the month value without zero
padding. The E modifier accessses alternative forms of month
names, e.g. %EB which in Russian locale gives a genitive
form. The ^ modifier can be used to convert the result
string to uppercase, while ~ capitalizes the result
string.
Format | Meaning |
%%
|
Percent character
|
%a
|
Abbreviated weekday name, e.g. "Mon"
|
%A
|
Weekday name
|
%b
|
Abbreviated month name, e.g. "Jan"
|
%B
|
Month name
|
%c
|
Date and time, e.g. "%a %b %d %H:%M:%S %Y"
|
%C
|
Century number, zero padded to two charachters.
|
%d
|
Day of month (1-31), zero padded to two characters.
|
%D
|
Date as "%m/%d/%y"
|
%e
|
Day of month (1-31), space padded to two characters.
|
%H
|
Hour (24 hour clock, 0-23), zero padded to two characters.
|
%h
|
See %b
|
%I
|
Hour (12 hour clock, 1-12), zero padded to two charcters.
|
%j
|
Day numer of year (1-366), zero padded to three characters.
|
%k
|
Hour (24 hour clock, 0-23), space padded to two characters.
|
%l
|
Hour (12 hour clock, 1-12), space padded to two characters.
|
%m
|
Month number (1-12), zero padded to two characters.
|
%M
|
Minute (0-59), zero padded to two characters.
|
%n
|
Newline
|
%p
|
"a.m." or "p.m."
|
%P
|
"am" or "pm"
|
%q
|
Quarter number (1-4)
|
%r
|
Time in 12-hour clock format. Equivalent to "%I:%M:%S %p".
|
%R
|
Time as "%H:%M"
|
%S
|
Seconds (0-60), zero padded to two characters. 60 only occurs in case of a leap second.
|
%t
|
Tab
|
%T
|
Time as "%H:%M:%S"
|
%u
|
Weekday as a decimal number (1-7), 1 is Sunday.
|
%U
|
Week number of year as a decimal number (0-53), with sunday as the first day of week 1,
zero padded to two characters.
|
%V
|
ISO week number of the year as a decimal number (1-53), zero padded to two characters.
|
%w
|
Weekday as a decimal number (0-6), 0 is Sunday.
|
%W
|
Week number of year as a decimal number (0-53), with sunday as the first day of week 1,
zero padded to two characters.
|
%x
|
Date as "%a %b %d %Y"
|
%X
|
See %T
|
%y
|
Year (0-99), zero padded to two characters.
|
%Y
|
Year (0-9999), zero padded to four characters.
|
<date strftime="%B %e %Y, %A %T"/> |
maj 28 2018, måndag 17:01:14 |
- lang="langcode"
-
Defines in what language a string will be presented in. Used together
with type=string and the part attribute to get
written dates in the specified language.
<date part='day' type='string' lang='de'/> |
Montag |
- case="{upper, lower, capitalize}"
-
Changes the case of the output to upper, lower or capitalize.
<date date='' lang='&client.language;' case='upper'/> |
DEN 28 MAJ 2018 |
- prec="number"
-
The number of decimals in the stardate.
|
|