Changes

Jump to navigation Jump to search
2,776 bytes added ,  12:37, 11 April 2010
Create reference page
<!-- please remove this and the following line if you have checked this page -->
{{Reference_Cleanup}}
{{Reference
|name=date
|attributes=
}}

== [[Help:Reference|Syntax]] ==
<table cellspacing="4" cellpadding="2" class="cmd">
<tr>
<td colspan="2" class="cmd">\date<span class="first" style="color:red;">[...,...=...,...]</span><span class="second" >[...,...,...]</span></td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/en/keyword:d|d]]</td>
<td>[[Reference/en/value:number|number]] </td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/en/keyword:m|m]]</td>
<td>[[Reference/en/value:number|number]] </td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[[Reference/en/keyword:y|y]]</td>
<td>[[Reference/en/value:number|number]] </td>
</tr>
<tr valign="top" class="second">
<td class="cmd">[...,...,...]</td>
<td></td>
</tr>
</table>


== Description ==
Display a date. First optional argument specifies the date using the day (d), month (m) and year (y). If omitted the current date is assumed.

The second optional argument specifies the output format. Available fields are:

''day'', ''month'', ''year'', weekday, dd, mm, yy, jj, d, m, y, j, referral.

You can also insert delimiters between the fields (e.g. commas, spaces, see examples).

== Examples ==

<texcode>
\date
\date[d=25,m=4,y=2008]
\date[d=25,m=4,y=2008][dd,--,mm,--,yy]
\date[d=25,m=4,y=2008][weekday,month,day,{,},year]
</texcode>

To get a short month use <texcode>\monthshort</texcode>
(lowercase, 25 apr 2008) or <texcode>\MONTHSHORT</texcode> (uppercase, 25 APR 2008) as follows:

<texcode>
\date[d=25,m=4,y=2008][day,~,{\monthshort\normalmonth},~,year]
\date[d=25,m=4,y=2008][day,~,{\MONTHSHORT\normalmonth},~,year]
</texcode>

It is possible to redefine the <texcode>\monthshort</texcode> form to have a starting capital (e.g. 25 Apr 2008). Put the following in your environment file:

<texcode>
\unprotect
\setuplabeltext [\s!en] [\v!january :\s!mnem=Jan]
\setuplabeltext [\s!en] [\v!february :\s!mnem=Feb]
\setuplabeltext [\s!en] [\v!march :\s!mnem=Mar]
\setuplabeltext [\s!en] [\v!april :\s!mnem=Apr]
\setuplabeltext [\s!en] [\v!may :\s!mnem=May]
\setuplabeltext [\s!en] [\v!june :\s!mnem=Jun]
\setuplabeltext [\s!en] [\v!july :\s!mnem=Jul]
\setuplabeltext [\s!en] [\v!august :\s!mnem=Aug]
\setuplabeltext [\s!en] [\v!september:\s!mnem=Sep]
\setuplabeltext [\s!en] [\v!october :\s!mnem=Oct]
\setuplabeltext [\s!en] [\v!november :\s!mnem=Nov]
\setuplabeltext [\s!en] [\v!december :\s!mnem=Dec]
\protect
</texcode>



== Example ==
<!-- Please fill in an example if you can -->

== See also ==
<!-- something like [[cmd:goto|\goto]] -->

[[Category:Reference/en|date]]
Anonymous user

Navigation menu