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.

Child tags

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 years, months, days, or seconds.


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.

<pattern>AGE IN YEARS</pattern>
  <interval format="%B %d, %Y">
    <from><bot name="birthdate"/></from>
    <to><date format="%B %d, %Y" /></to>

The style element specifies that the interval should be returned in years.