https://wiki.contextgarden.net/index.php?title=Command/date&feed=atom&action=history
Command/date - Revision history
2024-03-29T00:33:36Z
Revision history for this page on the wiki
MediaWiki 1.34.1
https://wiki.contextgarden.net/index.php?title=Command/date&diff=33017&oldid=prev
Taco at 09:58, 16 November 2021
2021-11-16T09:58:49Z
<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 09:58, 16 November 2021</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l21" >Line 21:</td>
<td colspan="2" class="diff-lineno">Line 21:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> </cd:assignments></div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> </cd:assignments></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> <cd:keywords list="yes" optional="yes" ordinal="2"></div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> <cd:keywords list="yes" optional="yes" ordinal="2"></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> <cd:keywordsdoc></cd:keywordsdoc></div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> <cd:keywordsdoc><ins class="diffchange diffchange-inline">The [[Commandvalue/name|name]] suffixes indicate number conversions. Any conversion, either built-in or defined by {{cmd|defineconversion}}, can be used there.</ins></cd:keywordsdoc></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> <cd:constant type="year">Year using arabic digits</cd:constant></div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> <cd:constant type="year">Year using arabic digits</cd:constant></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> <cd:constant method="range" prefix="year" type="cd:name">Year using a defined conversion</cd:constant></div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> <cd:constant method="range" prefix="year" type="cd:name">Year using a defined conversion</cd:constant></div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l117" >Line 117:</td>
<td colspan="2" class="diff-lineno">Line 117:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>You can also insert delimiters between the fields (e.g. commas, spaces, see examples).</cd:description></div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>You can also insert delimiters between the fields (e.g. commas, spaces, see examples).</cd:description></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><cd:examples><cd:example title=""><context source="yes"></div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><cd:examples><cd:example title=""><context source="yes"></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>\date[d=25,m=4,y=2008] \par </div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>\date[d=25,m=4,y=2008] \par</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>\date[d=25,m=4,y=2008][dd,--,mm,--,yy] \par</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>\date[d=25,m=4,y=2008][dd,--,mm,--,yy] \par</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>\date[d=25,m=4,y=2008][weekday,month,day,{,~},year] \par</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>\date[d=25,m=4,y=2008][weekday,month,day,{,~},year] \par</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></context></div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></context></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>To get a short month use <code>month:mnem</code> or <code>MONTH:mnem</code> as follows:</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline"></cd:example><cd:example title="Changing the default formatting">To change the formatting of the date in a global fashion the command {{cmd|setuplanguage}} is used. A change to ISO 8601 for instance can be achieved as follows:</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> </div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline"><context source="yes" text="Produces"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">\setuplanguage [en] [date={year, –, mm, –, dd}]</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> </div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">\date[d=25,m=4,y=2008]</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline"></context></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> </div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">For non english the setuplanguage command should be followed or preceded by setting a mainlanguage or it will not show up.</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline"><texcode></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">\setuplanguage [nl] [date={dd, –, mm, –, year}]</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">\mainlanguage [nl]</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline"></texcode></cd:example><cd:example title="Using and setting up mnemonics"></ins>To get a short month use <code>month:mnem</code> or <code>MONTH:mnem</code> as follows:</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><context source="yes"></div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><context source="yes"></div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l169" >Line 169:</td>
<td colspan="2" class="diff-lineno">Line 181:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"></cd:example><cd:example title="Changing the default formatting">To change the formatting of the date in a global fashion the command {{cmd|setuplanguage}} is used. A change to ISO 8601 for instance can be achieved as follows:</del></div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div></cd:example></cd:examples></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"><context source="yes" text="Produces"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">\setuplanguage [en] [date={year, –, mm, –, dd}]</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">\date[d=25,m=4,y=2008]</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"></context></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">For non english the setuplanguage command should be followed or preceded by setting a mainlanguage or it will not show up.</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"><texcode></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">\setuplanguage [nl] [date={dd, –, mm, –, year}]</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">\mainlanguage [nl]</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"></texcode></del></cd:example></cd:examples></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><cd:notes></cd:notes></div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><cd:notes></cd:notes></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><cd:seealso></div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><cd:seealso></div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l189" >Line 189:</td>
<td colspan="2" class="diff-lineno">Line 189:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><cd:commandref name="definedate"></cd:commandref></div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><cd:commandref name="definedate"></cd:commandref></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><cd:commandref name="currentdate"></cd:commandref></div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><cd:commandref name="currentdate"></cd:commandref></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><cd:commandref name="setuplanguage"></cd:commandref></cd:seealso></div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><cd:commandref name="setuplanguage<ins class="diffchange diffchange-inline">"></cd:commandref></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline"><cd:commandref name="setuplabeltext"></cd:commandref></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline"><cd:commandref name="convertnumber"></cd:commandref></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline"><cd:commandref name="defineconversion</ins>"></cd:commandref></cd:seealso></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></cd:commandgroup></div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></cd:commandgroup></div></td></tr>
</table>
Taco
https://wiki.contextgarden.net/index.php?title=Command/date&diff=33016&oldid=prev
Taco: Created page with "Documentation for \date"
2021-11-16T09:51:27Z
<p>Created page with "Documentation for \date"</p>
<p><b>New page</b></p><div><cd:commandgroup name="date" xmlns:cd="http://wiki.contextgarden.net/commanddoc/20200807"><br />
<cd:shortdesc>The command <tt>\date</tt> is used to typeset a formatted date<br />
</cd:shortdesc><br />
<cd:variants><br />
<cd:command category="counter" file="core-con.mkiv" interfacedate="2020-07-14T09:24" interfacefile="i-conversion.xml" keywords="language" level="document" name="date" variantnumber="1"><br />
<cd:arguments><br />
<cd:assignments list="yes" ordinal="1"><br />
<cd:assignmentsdoc></cd:assignmentsdoc><br />
<cd:parameter name="d"><br />
<cd:paramdoc></cd:paramdoc><br />
<cd:constant type="cd:number"></cd:constant><br />
</cd:parameter><br />
<cd:parameter name="m"><br />
<cd:paramdoc></cd:paramdoc><br />
<cd:constant type="cd:number"></cd:constant><br />
</cd:parameter><br />
<cd:parameter name="y"><br />
<cd:paramdoc></cd:paramdoc><br />
<cd:constant type="cd:number"></cd:constant><br />
</cd:parameter><br />
</cd:assignments><br />
<cd:keywords list="yes" optional="yes" ordinal="2"><br />
<cd:keywordsdoc></cd:keywordsdoc><br />
<cd:constant type="year">Year using arabic digits</cd:constant><br />
<cd:constant method="range" prefix="year" type="cd:name">Year using a defined conversion</cd:constant><br />
<cd:constant type="y">Alias for <cd:iref type="year"/></cd:constant><br />
<cd:constant method="range" prefix="y" type="cd:name"></cd:constant><br />
<cd:constant type="yy">Year using two arabic digits</cd:constant><br />
<cd:constant type="Y">Alias for <cd:iref type="year"/></cd:constant><br />
<cd:constant method="range" prefix="Y" type="cd:name"></cd:constant><br />
<cd:constant type="YY">Alias for <cd:iref type="yy"/></cd:constant><br />
<cd:constant type="month">Month using long name</cd:constant><br />
<cd:constant type="month:mnem">Month using mnemonic</cd:constant><br />
<cd:constant type="month:hebrew">Month name in Hebrew calendar</cd:constant><br />
<cd:constant type="month:jalali">Month name in Jalali calendar</cd:constant><br />
<cd:constant type="m">Alias for <cd:iref type="month"/></cd:constant><br />
<cd:constant type="m:mnem"></cd:constant><br />
<cd:constant type="m:hebrew"></cd:constant><br />
<cd:constant type="m:jalali"></cd:constant><br />
<cd:constant type="MONTH">Month using long name, in all uppercase</cd:constant><br />
<cd:constant type="MONTH:mnem"></cd:constant><br />
<cd:constant type="MONTH:hebrew"></cd:constant><br />
<cd:constant type="MONTH:jalali"></cd:constant><br />
<cd:constant type="mm">Month using two arabic digits</cd:constant><br />
<cd:constant type="M">Month using arabic digits</cd:constant><br />
<cd:constant type="day">Day using arabic digits</cd:constant><br />
<cd:constant method="range" prefix="day" type="cd:name">Day using a defined conversion</cd:constant><br />
<cd:constant type="day:+">Alias for <cd:iref type="day:ord"/></cd:constant><br />
<cd:constant type="day:ord">Day using arabic digits, with ordinal indicator suffix</cd:constant><br />
<cd:constant type="day:++">Alias for <cd:iref type="day:highord"/></cd:constant><br />
<cd:constant type="day:highord">Day using arabic digits, with ordinal indicator suffix in superscript</cd:constant><br />
<cd:constant type="d">Alias for <cd:iref type="day"/></cd:constant><br />
<cd:constant method="range" prefix="d" type="cd:name"></cd:constant><br />
<cd:constant type="d:+"></cd:constant><br />
<cd:constant type="d:ord"></cd:constant><br />
<cd:constant type="d:++"></cd:constant><br />
<cd:constant type="d:highord"></cd:constant><br />
<cd:constant type="dd">Day using two arabic digits</cd:constant><br />
<cd:constant type="dd:+"></cd:constant><br />
<cd:constant type="dd:ord"></cd:constant><br />
<cd:constant type="dd:++"></cd:constant><br />
<cd:constant type="dd:highord"></cd:constant><br />
<cd:constant type="D">Alias for <cd:iref type="day"/></cd:constant><br />
<cd:constant type="D:+"></cd:constant><br />
<cd:constant type="D:ord"></cd:constant><br />
<cd:constant type="D:++"></cd:constant><br />
<cd:constant type="D:highord"></cd:constant><br />
<cd:constant type="weekday">Weekday using long name</cd:constant><br />
<cd:constant type="weekday:mnem">Weekday using mnemonic</cd:constant><br />
<cd:constant type="weekday:hebrew"></cd:constant><br />
<cd:constant type="weekday:jalali"></cd:constant><br />
<cd:constant type="w">Alias for <cd:iref type="weekday"/></cd:constant><br />
<cd:constant type="w:mnem"></cd:constant><br />
<cd:constant type="w:hebrew"></cd:constant><br />
<cd:constant type="w:jalali"></cd:constant><br />
<cd:constant type="WEEKDAY">Weekday using long name, in all uppercase</cd:constant><br />
<cd:constant type="WEEKDAY:mnem"></cd:constant><br />
<cd:constant type="WEEKDAY:hebrew"></cd:constant><br />
<cd:constant type="WEEKDAY:jalali"></cd:constant><br />
<cd:constant type="W">Weekday using arabic digits</cd:constant><br />
<cd:constant type="referral">Date in iso format (yyyymmdd)</cd:constant><br />
<cd:constant type="space">Typesets a space as separator</cd:constant><br />
<cd:constant type="\\\\\\\\\\\\\\\\␣">Typesets a space as separator (actual input: <code>\ </code>, there is too much string quoting on the wiki)</cd:constant><br />
<cd:constant type="cd:text">Any user-supplied separator</cd:constant><br />
<cd:constant type="hebrew:to">Convert date to Hebrew calendar first</cd:constant><br />
<cd:constant type="jalali:to">Convert date to Jalali calendar first</cd:constant><br />
<cd:constant type="jalali:from">Convert date from Jalali calendar first</cd:constant><br />
</cd:keywords><br />
</cd:arguments><br />
</cd:command><br />
<cd:command category="counter" file="core-con.mkiv" interfacedate="2020-07-14T09:24" interfacefile="i-conversion.xml" keywords="language" level="document" name="date" variant="name" variantnumber="2"><br />
<cd:arguments><br />
<cd:assignments list="yes" ordinal="1"><br />
<cd:assignmentsdoc></cd:assignmentsdoc><br />
<cd:parameter name="d"><br />
<cd:paramdoc></cd:paramdoc><br />
<cd:constant type="cd:number"></cd:constant><br />
</cd:parameter><br />
<cd:parameter name="m"><br />
<cd:paramdoc></cd:paramdoc><br />
<cd:constant type="cd:number"></cd:constant><br />
</cd:parameter><br />
<cd:parameter name="y"><br />
<cd:paramdoc></cd:paramdoc><br />
<cd:constant type="cd:number"></cd:constant><br />
</cd:parameter><br />
</cd:assignments><br />
<cd:keywords optional="yes" ordinal="2"><br />
<cd:keywordsdoc></cd:keywordsdoc><br />
<cd:constant type="cd:name">This is a date format defined with {{cmd|definedate}}</cd:constant><br />
</cd:keywords><br />
</cd:arguments><br />
</cd:command><br />
</cd:variants><br />
<cd:description>Display a date. First argument specifies the date using the day (d), month (m) and year (y). If omitted the current date is assumed, but this is not officially supported. Use {{cmd|currentdate}} if you want the current date.<br />
<br />
You can also insert delimiters between the fields (e.g. commas, spaces, see examples).</cd:description><br />
<cd:examples><cd:example title=""><context source="yes"><br />
\date[d=25,m=4,y=2008] \par <br />
\date[d=25,m=4,y=2008][dd,--,mm,--,yy] \par<br />
\date[d=25,m=4,y=2008][weekday,month,day,{,~},year] \par<br />
</context><br />
<br />
To get a short month use <code>month:mnem</code> or <code>MONTH:mnem</code> as follows:<br />
<br />
<context source="yes"><br />
\date[d=25,m=4,y=2008][day,~,month:mnem,~,year] \par<br />
\date[d=25,m=4,y=2008][day,~,MONTH:mnem,~,year]<br />
</context><br />
<br />
It is possible to redefine the <code>month:mnem</code> form to have a starting capital (e.g. 25 Apr 2008). Put the following in your environment file:<br />
<br />
<texcode><br />
\setuplabeltext<br />
[en]<br />
[ january:mnem=Jan,<br />
february:mnem=Feb,<br />
march:mnem=Mar,<br />
april:mnem=Apr,<br />
may:mnem=May,<br />
june:mnem=Jun,<br />
july:mnem=Jul,<br />
august:mnem=Aug,<br />
september:mnem=Sep,<br />
october:mnem=Oct,<br />
november:mnem=Nov,<br />
december:mnem=Dec]<br />
</texcode><br />
<br />
To get a short weekday use <code>weekday:mnem</code> as follows:<br />
<br />
<texcode><br />
\date[d=25,m=4,y=2008][weekday:mnem,~,day,~,month,~,year] \par<br />
</texcode><br />
<br />
It is possible to redefine the <code>weekday:mnem</code> form to have a starting capital. Put the following in your environment file:<br />
<br />
<texcode><br />
\setuplabeltext<br />
[en]<br />
[ monday:mnem=Mon,<br />
tuesday:mnem=Tue,<br />
wednesday:mnem=Wed,<br />
thursday:mnem=Thu,<br />
friday:mnem=Fri,<br />
saturday:mnem=Sat,<br />
sunday:mnem=Sun]<br />
</texcode><br />
<br />
<br />
</cd:example><cd:example title="Changing the default formatting">To change the formatting of the date in a global fashion the command {{cmd|setuplanguage}} is used. A change to ISO 8601 for instance can be achieved as follows:<br />
<br />
<context source="yes" text="Produces"><br />
\setuplanguage [en] [date={year, –, mm, –, dd}]<br />
<br />
\date[d=25,m=4,y=2008]<br />
</context><br />
<br />
For non english the setuplanguage command should be followed or preceded by setting a mainlanguage or it will not show up.<br />
<texcode><br />
\setuplanguage [nl] [date={dd, –, mm, –, year}]<br />
\mainlanguage [nl]<br />
</texcode></cd:example></cd:examples><br />
<cd:notes></cd:notes><br />
<cd:seealso><br />
<cd:source file="core-con.mkiv" originator="system"></cd:source><br />
<cd:wikipage originator="system" page="Category:Counter"></cd:wikipage><br />
<cd:wikipage originator="system" page="Keywords:Language"></cd:wikipage><br />
<cd:commandref name="definedate"></cd:commandref><br />
<cd:commandref name="currentdate"></cd:commandref><br />
<cd:commandref name="setuplanguage"></cd:commandref></cd:seealso><br />
</cd:commandgroup></div>
Taco