Template:Roman Date/doc: Difference between revisions

Jump to navigation Jump to search
no edit summary
(Created page with "{{Lua sidebar}} This module implements the {{tl|Roman Date}} template. For behavioural documentation, please see the template page. * This module supports dates formatted in the form YYYY-MM-DD or MM-DD * This is a new module and may be subject to bugs, to report bugs please use the discord * This module also supports leap years ==Known Bugs== * Doesn't check for dates that are past the maximum number of days in a month * Doesn't check for dates below 1 and thus may fail")
 
No edit summary
Line 1: Line 1:
{{Documentation subpage}}
{{Lua|Module:Roman Date}}
{{Lua sidebar}}
{{Lua sidebar}}


Line 5: Line 7:
* This module supports dates formatted in the form YYYY-MM-DD or MM-DD
* This module supports dates formatted in the form YYYY-MM-DD or MM-DD
* This is a new module and may be subject to bugs, to report bugs please use the discord
* This is a new module and may be subject to bugs, to report bugs please use the discord
* This module also supports leap years
* This module also supports leap years which are handled as per the current leap year standard:
** if (year is not divisible by 4) then (it is a common year)
** else if (year is not divisible by 100) then (it is a leap year)
** else if (year is not divisible by 400) then (it is a common year)
** else (it is a leap year)
 
== Usage ==
{{pre|<nowiki>{{Roman Date|</nowiki>''YYYY-MM-DD''<nowiki>}}</nowiki>}}
 
Replace <code>''YYYY-MM-DD''</code> with the date you would like to be converted to Roman dating.
 
For more information please see [[Roman Dates]].
 
== Examples ==
{|class="wikitable" style="text-align:center"
! Gregorian Calendar !! Template call !! Roman Date
|-
|2022-06-09 || <nowiki>{{Roman Date|2022-06-09}}</nowiki> || {{Roman Date|2022-06-09}}
|-
|2021-10-20|| <nowiki>{{Roman Date|2021-10-20}}</nowiki> || {{Roman Date|2021-10-20}}
|-
|2022-01-01|| <nowiki>{{Roman Date|2022-01-01}}</nowiki> || {{Roman Date|2022-01-01}}
|-
|12-23|| <nowiki>{{Roman Date|12-23}}</nowiki> || {{Roman Date|12-23}}
|-
|01-01 || <nowiki>{{Roman Date|01-01}}</nowiki> || {{Roman Date|2022-01-01}}
|-
|02-29 || <nowiki>{{Roman Date|02-29}}</nowiki> || {{Roman Date|02-29}}
|-
|02-28 || <nowiki>{{Roman Date|02-28}}</nowiki> || {{Roman Date|02-28}}
|-
|2024-02-29 || <nowiki>{{Roman Date|2024-02-29}}</nowiki> || {{Roman Date|2024-02-29}}
|-
|2000-02-29 || <nowiki>{{Roman Date|2000-02-29}}</nowiki> || {{Roman Date|2000-02-29}}
|-
|2022-01-13 || <nowiki>{{Roman Date|2022-01-13}}</nowiki> || {{Roman Date|2022-01-13}}
|-
|2020-06-05 || <nowiki>{{Roman Date|2020-06-05}}</nowiki> || {{Roman Date|2020-06-05}}
|-
|2016-02-24 || <nowiki>{{Roman Date|2016-02-24}}</nowiki> || {{Roman Date|2016-02-24}}
|-
|2017-02-24 || <nowiki>{{Roman Date|2017-02-24}}</nowiki> || {{Roman Date|2017-02-24}}
|-
|2001-12-21 || <nowiki>{{Roman Date|2001-12-21}}</nowiki> || {{Roman Date|2001-12-21}}
|-
|{{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY2}} || <nowiki>{{Roman Date|</nowiki>{{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY2}}<nowiki>}}</nowiki> || {{Roman Date|{{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY2}}}}
|}
 
==Known Improvements==
* In the future the year should also be converted to AVC to consular years (much more difficult).
* All years should be given as CE, for dates that are BCE please make the year negative.


==Known Bugs==
==Known Bugs==
* Doesn't check for dates that are past the maximum number of days in a month
* Doesn't check for dates that are past the maximum number of days in a month
* Doesn't check for dates below 1 and thus may fail
* Doesn't check for dates below 1 and thus may fail
==TemplateData==
{{TemplateDataHeader}}
<templatedata>
{
"params": {
"1": {
"type": "date",
"label": "Date",
"example": "2022-06-09",
"description": "The date to be converted to Roman dating format (counting towards the nearest holy day). This can be in the format YYYY-MM-DD or MM-DD. If the date cannot be processed, nothing will be returned."
}
},
"description": "Convert dates to Roman dating format."
}
</templatedata>
==See also==
* {{tl|Roman Numeral}}
* [[Roman Dates]]

Navigation menu