Home > BOOKING > Templates > How to format and translate dates in booking templates

How to format and translate dates in booking templates

In details, dates are shown in the format yyyy-mm-dd, for example: 2016-11-08. This format is used across the platform to keep dates consistent and easy to read.

In your Booking Templates, for example in contracts, itineraries, or tourbooks, you can customize how dates are displayed. You can show only the day, the full month name, the weekday in different languages, or combine multiple date elements.

For general information on how dates are displayed in details, see our Date Format Policy.

Booking Start Date

Variable Output example
[% ph.date_start %] Mon 2016-11-08
[% ph.startdate_dd %] 08
[% ph.startdate_mm %] 11
[% ph.startdate_yyyy %] 2016

Day of the Week, Localized

  • [% ph.startdate_day("en") %] — Monday
  • [% ph.startdate_day("de") %] — Montag
  • [% ph.startdate_day("fr") %] — Lundi
  • [% ph.startdate_day("es") %] — Lunes
  • [% ph.startdate_day("pt") %] — Segunda-Feira

Month Name, Localized

  • [% ph.startdate_month("en") %] — November
  • [% ph.startdate_month("de") %] — November
  • [% ph.startdate_month("fr") %] — Novembre
  • [% ph.startdate_month("es") %] — Noviembre
  • [% ph.startdate_month("pt") %] — Novembro

Document Creation Date

Variable Output example
[% ph.print_date %] 2016-11-08
[% ph.printdate_dd %] 08
[% ph.printdate_mm %] 11
[% ph.printdate_yyyy %] 2016

Month Name, Localized

  • [% ph.printdate_mm("en") %] — November
  • [% ph.printdate_mm("de") %] — November
  • [% ph.printdate_mm("fr") %] — Novembre
  • [% ph.printdate_mm("es") %] — Noviembre
  • [% ph.printdate_mm("pt") %] — Novembro

Hotel and Due Date Variables

Variables are also available for Hotel start and end dates when needed.

In addition, variables are available for due dates of artist fees and booking fees.


Date Calculation Example

You can calculate dates depending on another date in your template. The following example adds 1 day to the event date:

[% USE date; %]
[% new_startdate = date.calc.Add_Delta_Days( ph.startdate_yyyy, ph.startdate_mm, ph.startdate_dd, 1) %]
[% new_startdate.2 %].[% new_startdate.1 %].[% new_startdate.0 %]

You can also format a date plus 2 days in a readable form, for example: Fri 23. April 2017.

[% USE date; %]
[% startdate_plus2 = date.calc.Add_Delta_Days( ph.startdate_yyyy, ph.startdate_mm, ph.startdate_dd, 2) %]
[% date.format( startdate_plus2, '%a') %], [% startdate_plus2.2 %]. [% date.format( startdate_plus2, '%B') %] [% startdate_plus2.0 %]

Alternatively:

[% USE date; date.format( startdate_plus2, '%a, %Y-%m-%d') %]

Date Format Tokens

You can format any calculated or static date using the following tokens:

Token Description Example
%a Short day name Mon
%Y Full year 2024
%y Short year 24
%m Month number 01–12
%b Short month name Nov
%B Full month name November
%d Day of month 01–31
%H Hour 00–23
%M Minute 00–59
%s Second 00–59

Invoice Date Formatting

For invoices, it is also possible to customize the invoice date format displayed in specific languages.

Please let us know which formats you would like to use per language. This can be custom programmed and is billable at the standard rate.