Date Script Service

Last modified by Admin on 2024/05/11 01:01

calendar_view_dayScript services to display dates in a nice way.
Developed by

XWiki Development Team

0 Votes
LicenseGNU Lesser General Public License 2.1
Bundled With

XWiki Standard


Since XWiki 10.5-rc-1 and XWiki 9.11.5.

Installable with the Extension Manager


This script services offer some methods to display dates in a pretty way, and supporting a lot of locales (contrary to $datetool). It is currently based on PrettyTime.


Here are some Velocity examples:

## Example 1:
## Displays: moments from now ("à l'instant" in French)

## Example 2:
## Displays: 12 minutes ago ("il y a 12 minutes" in French)

## Example3: You can also specify the locale you want
$$xwiki.jodatime.dateTime.minusHours(1).toDate(), "es")
## Displays "hace 1 hora"

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager).

You can also use the manual method which involves dropping the JAR file and all its dependencies into the WEB-INF/lib folder and restarting XWiki.


Dependencies for this extension (org.xwiki.platform:xwiki-platform-date 16.3.1):

Get Connected