Wählen Sie Ihre Sprache:

<we:date>

Since version: - | Requires endtag: no

Description

This tag shows the current date on a webEdition document.

Attributes

type

Default value: - | since version: - | required: no

Set this attribute to "js" or leave it unset, if you want the date to be generated by JavaScript (Date and time of the user's system will be used). If the date should be generated by PHP (date and time of the webserver will be used), set the attribute to "php".

Allowed values:

  • js
  • php

format

Default value: - | since version: - | required: no

Set this attribute to determine the format of the output.

If this tags attribute "type" is set to "js", the following arguments are allowed:

Format character Description
d Day of month, two-digit with leading null: "01" to "31"
j Day of month without leading null: "1" to "31"
m Month: "01" to "12"
n Month without leading null: "1" to "12"
Y Year as a four-digit number, e.g. "1999"
y Year as a two-digit number, e.g. "99"
h Hour in a 12-hour format: "01" to "12"
H Hour in a 24-hour format: "00" to "23"
G Hour in a 24-hour format without leading null: "0" to "23"
g Hour in a 12-hour format without leading null: "1" to "12"
i Minutes: "00" to "59"

If this tags attribute "type" is set to "php", or the attribute isn't set at all, the following arguments are allowed:

Format character Description
d Day of month, two-digit with leading null: "01" to "31"
D Day of week in shortened form, e.g. "Fr"
F Month as a word, e.g. "January"
g Hour in a 12-hour format without leading null: "1" to "12"
G Hour in a 24-hour format without leading null: "0" to "23"
h Hour in a 12-hour format: "01" to "12"
H Hour in a 24-hour format: "00" to "23"
i Minutes: "00" to "59"
j Day of month without leading null: "1" to "31"
l (lower case 'L') day of week in full form, e.g. "Friday"
m Month: "01" to "12"
M Month in shortened form, e.g. "Jan"
n Month without leading null: "1" to "12"
s Seconds: "00" to "59"
t Number of days in the given month: "28" to "31"
w Weekday starting with "0" (Sunday) to "6" (Saturday)
Y Year as a four-digit number, e.g. "1999"
y Year as a two-digit number, e.g. "99"
z Day of the year: "0" to "365"

cachelifetime

Default value: 0 | since version: 4.2.0.0 | required: no

With this attribute you define the validity of the Cache in seconds for this we:Tag. This attribute is used only if cache type defined in the template is we:Tag Cache or Cache is disabled.


Syntax

<we:date [type="js|php"] [format="attribute"] [cachelifetime="attribute"] />

Examples

Example #1 (for static sites)

<we:date type="js" format="d.m.Y"/>

Example #2 (for dynamic sites)

<we:date format="d.m.Y"/>
or
<we:date type="php" format="d.m.Y"/>