Age

From Sega Retro

Convert a date in the format YYYY-MM-DD to an age in years (based on the current date).

Usage

{{age|1991-06-23}}

returns

{{#var_define:date2_y|2024}}{{#var_define:date2_m|11}}{{#var_define:date2_d|7}}Expression error: Unrecognized punctuation character "[".Expression error: Unrecognized punctuation character "[".Expression error: Unrecognized punctuation character "[".

Optional parameter

Add a second date to calculate the age on that date.

{{age|1991-06-23|1999-09-09}}

returns

{{#var_define:date2_y|1999}}{{#var_define:date2_m|09}}{{#var_define:date2_d|09}}Expression error: Unrecognized punctuation character "[".Expression error: Unrecognized punctuation character "[".Expression error: Unrecognized punctuation character "[".