ComboStrap - Date Component


With the date component, you can format any date:


Today's date

  • The markup
  • The output is a date formatted to the default format.

Thursday, 02 February 2023

To have it refresh every day, we expire the cache date daily

<cache expiration="@daily"/>

Today's date - short format

  • Today's date with a short month description and the day number US style
<date format="%h %d"/>
  • The output:

Feb 02

Today's date in French

  • The markup with the lang attribute
<date lang="fr"/>
  • The output is a date formatted with French word.

jeudi, 02 fvrier 2023

Date specified manually

<date format="%A">2021-09-27</date>
  • The output gives the day name of the date (ie %A)


Date of a page

With a template component, you can even print a date metadata of a page.

  • The output will be:

Sunday, 26 September 2021


  • For the today's date
<date format="formatValue" lang="langValue"/>
  • When specifying a date value
<date format="formatValue" lang="langValue">dateValue</date>


Powered by ComboStrap