The interval element is used in conjunction with the date element to calculate the difference between two different times/dates.
Specifies the format of the returned date. This can be written like arguments to UNIX’s
strftime function. More on this here.
Specifies the date from which the interval should begin.
Specifies the date at which the interval should end.
Specifies the style in which the interval should be returned. Can contain
To calculate the difference between the current date and the bot’s birthdate, make sure to include a birthdate property in the
.properties file, in a format that matches the format you intend to be working with.
<category> <pattern>AGE IN YEARS</pattern> <template> <interval format="%B %d, %Y"> <style>years</style> <from><bot name="birthdate"/></from> <to><date format="%B %d, %Y" /></to> </interval> </template> </category>
The style element specifies that the interval should be returned in years.