Jump to content

Template:Date and time if provided/doc

From Wikipedia, the free encyclopedia

Usage

[edit]

Takes a date value, and returns a DMY date and time if both are provided. Returns just the date if the time is not provided or is set to midnight.

Template parameters

ParameterDescriptionTypeStatus
Date/time value1

The date or date and time value being evaluated

Default
Current time
Daterequired
Date format2

Format of the date part of the date (see the #time parser function documentation)

Default
j F Y
Unknownsuggested

Examples

[edit]
  • {{tlx|date and time if provided|April 7, 1887}} → 7 April 1887
  • {{tlx|date and time if provided|April 7, 1887 14:17}} → 7 April 1887 14:17