Template:StardateLifespan: Difference between revisions

From 118Wiki
Jump to navigation Jump to search
No edit summary
(<_<)
Line 1: Line 1:
<includeonly>{{#ifexpr: {{{4|}}} > {{{2|}}} and {{{1}}} != {{{3|}}}|{{{#expr:{{{1|}}} - 1 - {{{3|}}}y {{{#expr:{{{2|}}}+ 12 - {{{4|}}}m}}}}}}|{{{#expr:{{{1|}}} - {{{3|}}}}}}y {{{#expr:{{{2|}}}- {{{4|}}}m}}}}}</includeonly><noinclude>
<includeonly>{{#ifexpr: {{{4|}}} > {{{2|}}} and {{{1}}} != {{{3|}}}|{{{#expr:({{{1|}}} - 1 - {{{3|}}})}}}y {{{#expr:({{{2|}}}+ 12 - {{{4|}}})m}}}|{{{#expr:({{{1|}}} - {{{3|}})}}}}y {{{#expr:({{{2|}}}- {{{4|}}})m}}}}}</includeonly><noinclude>
This calculates the span between two stardates. Used as such:<br>
This calculates the span between two stardates. Used as such:<br>
{{StardateLifespan|2370|3|2369|8}} with the sequence being date 2 (year, month) and date 1 (year, month)</noinclude>
{{StardateLifespan|2370|3|2369|8}} with the sequence being date 2 (year, month) and date 1 (year, month)</noinclude>

Revision as of 19:26, 11 February 2015

This calculates the span between two stardates. Used as such:
{{{#expr:(2370 - 1 - 2369)}}}y {{{#expr:(3+ 12 - 8)m}}} with the sequence being date 2 (year, month) and date 1 (year, month)