date_age - Lasso 8 Custom Tag Returns Age in Years
The project date_age and its source files are hosted on GitHub.
[date_age] returns age in years. By default the current date is used to determine age, but can be overridden by passing in a second date.
1 2 3
date_age(-dob=date('2000-02-29')); '<br />'; date_age(-dob=date('2000-02-28'), -end=date('2010-03-01'));
1 2 3
=> 10 10
Instructions for installing date_age are in the demo file date_age_demo/index.lasso.
Did you like this article? Please send me a Gratipay, as little as 25¢ per week!
Updates, suggestions and comments regarding this article may be sent to Steve Piercy, [email protected] or comment using Disqus.