Template:Start date
Usage:
YYYY{{#if:|-{{{2}}}{{#if:|-{{{3}}}}}}}
→ displays just the year
YYYY{{#if:MM|-MM{{#if:|-{{{3}}}}}}}
→ displays year and month
YYYY{{#if:MM|-MM{{#if:DD|-DD}}}}
→ full date (YYYY-MM-DD)
Optionally, you can use the df parameter for day-first formatting:
YYYY{{#if:MM|-MM{{#if:DD|-DD}}}}
→ DD-MM-YYYY (visual only)
The output is a simple machine-readable and visually minimal date string.