Template:Loredate: Difference between revisions
m Fixed academical system conditions #2 |
m Fixing some custom parameters |
||
Line 21: | Line 21: | ||
| 10|12 = 30 | | 10|12 = 30 | ||
| 0 }} | | 0 }} | ||
}}, {{#if: {{{long|}}}|Year | | }}, {{#if: {{{long|}}}|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)}} [[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)}} [[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> |
Revision as of 19:20, 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:
- {{Loredate|date=Dec 21 2025}} →→ Ruve 51, 51 3E
- {{Loredate|date=Dec 21 2025|academical=yes}} →→ Ruve 51, 1342 AE
- {{Loredate|date=2024-07-14}} →→ Vale 14, 726 2E
- {{Loredate|date=August 5, 2025|nod=yes}} →→ Vale 36, 31 3E
- {{Loredate|date=October 5, 2025|noy=yes}} →→ Surmich 35
- {{Loredate}} →→ Vale 25, 30 3E