User:Glamtre/Sandbox

Expressions

 * Year(s)
 * Month(s)
 * Day(s)

Date Delta Logic
'Template Call:'

does not seem to be loaded on this wiki

lhs[DICM] = days in current month of lhs date and will need to be a separate function

lhs = YYYYMMDD (pass parameter in the past therefore always less than rhs) rhs = YYYYMMDD (current date)

test that lhs < rhs if not fail

calculate years: if rhs[YYYY] - lhs [YYYY] > 0 and if rhs[MM] - lhs [MM] > 0 and if rhs[DD] - lhs [DD] > 0 then rhs[YYYY] - lhs [YYYY] else rhs[YYYY] - lhs[YYYY] -1

calculate months:if rhs[YYYY] = lhs[YYYY] then rhs[MM] - lhs[MM] else rhs[MM] + (12-lhs[YYYY])

calculate days (good): if rhs[DD] > lhs [DD] then rhs[DD] - lhs[DD] else rhs[DD] + lhs[DICM] - lhs[DD])

Testing Sets
Example Set 1

20060411 lhs 20070412 rhs

20060413 lhs 20070412 rhs

Example Set 2

20060311 lhs 20070412 rhs

20060313 lhs 20070412 rhs

Example Set 3

20060511 lhs 20070412 rhs

20060513 lhs 20070412 rhs

Code
Edit this section to edit the code without editing the whole page.

Icons and Names

 * Assassin
 * Dervish
 * Elementalist
 * Mesmer
 * Monk
 * Necromancer
 * Paragon
 * Ranger
 * Ritualist
 * Warrior

Links
Glamtre/Foe Cleaver