Template:Loredate: Difference between revisions
m Fixed long parameter text for AE |
m Testing no date feature |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{#if: {{{noy|}}}|{{#switch: {{#time: n|{{{date|}}}}} | {{#if: {{{noy|}}}| {{#if: {{{nod|}}} | | {{#switch: {{#time: n|{{{date|}}}}} | ||
| 1|2 = Allunor | | 1|2 = Allunor | ||
| 3|4 = Fembril | | 3|4 = Fembril | ||
Line 10: | Line 10: | ||
| 10|12 = 30 | | 10|12 = 30 | ||
| 0 }} | | 0 }} | ||
}} | {{#switch: {{#time: n|{{{date|}}}}} | }}}} | {{#if: {{{nod|}}} | |{{#switch: {{#time: n|{{{date|}}}}} | ||
| 1|2 = Allunor | | 1|2 = Allunor | ||
| 3|4 = Fembril | | 3|4 = Fembril | ||
Line 21: | Line 21: | ||
| 10|12 = 30 | | 10|12 = 30 | ||
| 0 }} | | 0 }} | ||
}}, {{#if: {{{long|}}}|Year | }}, }}{{#if: {{{long|}}}| {{#if: {{{academical|}}}|year|Year}}|}} {{#if: {{#ifexpr: {{#time: U|{{{date|}}}}} < 955749600| 1}}{{{academical|}}} | ||
| {{#expr: 1291 + ((((({{#time: Y|{{{date|}}}}} - 2025) * 365) + {{#time: z|{{{date|}}}}} + 2) + (((({{#time: Y|{{{date|}}}}} - 2025) * 365) + {{#time: z|{{{date|}}}}} + 2)/1154 round 0))/7 round 0)}} {{#if: {{{long|}}}|in the [[academical system]]|[[Academical system|AE]]}} | | {{#expr: 1291 + ((((({{#time: Y|{{{date|}}}}} - 2025) * 365) + {{#time: z|{{{date|}}}}} + 2) + (((({{#time: Y|{{{date|}}}}} - 2025) * 365) + {{#time: z|{{{date|}}}}} + 2)/1154 round 0))/7 round 0)}} {{#if: {{{long|}}}|in the [[academical system]]|[[Academical system|AE]]}} | ||
| {{#ifexpr: {{#time: Y|{{{date|}}}}} > 2024 | {{#expr: (((({{#time: Y|{{{date|}}}}} - 2025) * 365) + {{#time: z|{{{date|}}}}} + 2) + (((({{#time: Y|{{{date|}}}}} - 2025) * 365) + {{#time: z|{{{date|}}}}} + 2)/1154 round 0))/7 round 0}} {{#if: {{{long|}}}|of the [[Third Era]]|[[Third Era|3E]]}} | {{#ifexpr: {{#time: U|{{{date|}}}}} > 1282078799 | {{#expr: 750 + ((((({{#time: Y|{{{date|}}}}} - 2025) * 365) + {{#time: z|{{{date|}}}}} + 2) + (((({{#time: Y|{{{date|}}}}} - 2025) * 365) + {{#time: z|{{{date|}}}}} + 2)/1154 round 0))/7 round 0)}} {{#if: {{{long|}}}|of the [[Second Era]]|[[Second Era|2E]]}} | {{#expr: 1291 + ((((({{#time: Y|{{{date|}}}}} - 2025) * 365) + {{#time: z|{{{date|}}}}} + 2) + (((({{#time: Y|{{{date|}}}}} - 2025) * 365) + {{#time: z|{{{date|}}}}} + 2)/1154 round 0))/7 round 0)}} {{#if: {{{long|}}}|of the [[First Era]]|[[First Era|1E]]}}}}}}}}}}<noinclude> | | {{#ifexpr: {{#time: Y|{{{date|}}}}} > 2024 | {{#expr: (((({{#time: Y|{{{date|}}}}} - 2025) * 365) + {{#time: z|{{{date|}}}}} + 2) + (((({{#time: Y|{{{date|}}}}} - 2025) * 365) + {{#time: z|{{{date|}}}}} + 2)/1154 round 0))/7 round 0}} {{#if: {{{long|}}}|of the [[Third Era]]|[[Third Era|3E]]}} | {{#ifexpr: {{#time: U|{{{date|}}}}} > 1282078799 | {{#expr: 750 + ((((({{#time: Y|{{{date|}}}}} - 2025) * 365) + {{#time: z|{{{date|}}}}} + 2) + (((({{#time: Y|{{{date|}}}}} - 2025) * 365) + {{#time: z|{{{date|}}}}} + 2)/1154 round 0))/7 round 0)}} {{#if: {{{long|}}}|of the [[Second Era]]|[[Second Era|2E]]}} | {{#expr: 1291 + ((((({{#time: Y|{{{date|}}}}} - 2025) * 365) + {{#time: z|{{{date|}}}}} + 2) + (((({{#time: Y|{{{date|}}}}} - 2025) * 365) + {{#time: z|{{{date|}}}}} + 2)/1154 round 0))/7 round 0)}} {{#if: {{{long|}}}|of the [[First Era]]|[[First Era|1E]]}}}}}}}}}}<noinclude> | ||
{{Documentation}} | {{Documentation}} | ||
</noinclude> | </noinclude> |
Latest revision as of 19:30, 20 July 2025
Vale 25, 30 3E
This template is used to convert real time (Gregorian calendar) to the in-game Shine calendar.
For an auto-updating age calculator, see {{Template:Loreage}}
Its full syntax is:
{{Loredate |date = <-- insert known IRL date here to convert it to a lore date --> |long = <-- set to "yes" if you want to display long-format date --> |academical = <-- set to "yes" if you want to force the academical system dating --> |noy = <-- set to "yes" to remove year value --> |nod = <-- set to "yes" to remove date value --> }}
Dates can be inserted in formats like July 21, 2025
or Jul 21 2025
or 2025-07-21
. Not setting a date means that the conversion will be done continuously on the current date of any day. By default, the conversion is done to the Sevoan system noted by an era number, but users can set the "academical" parameter to any value to force the academical system's notation. Here are some examples of use: