සැකිල්ල:Format date/ලේඛය

විකිපීඩියා වෙතින්
Jump to navigation Jump to search

Usage[සංස්කරණය]

This template ({{Format date}}) returns a date, or date-time, without the hidden version for use in microformats. This template is probably best used internally in other templates.

If you need the microformat support, use template {{Start date}} instead.

If you want sortable dates for a table, use {{Date table sorting}} instead.

Syntax[සංස්කරණය]

  • {{Format date|year|month|day}}
  • {{Format date|year|month|day|HH|MM|SS|TimeZone}} (MM and SS are optional; TimeZone may be a numerical value, or "Z" for UTC; see examples)

Examples:

  • {{Format date|1993}} returns "1993"
  • {{Format date|1993|02}} returns "පෙබරවාරි 1993"
  • {{Format date|1993|02|24}} returns "පෙබරවාරි 24, 1993"
  • {{Format date|1993|02|24|08|30}} returns "08:30, පෙබරවාරි 24, 1993"
  • {{Format date|1993|02|24|08|+01:00}} returns "පෙබරවාරි 24, 1993 (+01:00)"
  • {{Format date|1993|02|24|08|-07:00}} returns "පෙබරවාරි 24, 1993 (-07:00)"
    {{Format date|1993|02|24|08|30|23}} returns "08:30:23, පෙබරවාරි 24, 1993"
  • {{Format date|1993|02|24|08|30|23|Z}} returns "08:30:23, පෙබරවාරි 24, 1993 (UTC)"
  • {{Format date|1993|02|24|08|30|23|+01:00}} returns "08:30:23, පෙබරවාරි 24, 1993 (+01:00)"
  • {{Format date|1993|02|24|08|30|23|-07:00}} returns "08:30:23, පෙබරවාරි 24, 1993 (-07:00)"

An optional parameter, df, can be set to "y" or "yes" (or indeed any value) to display the day before the month. This is primarily used in articles about events in parts of the world where the day precedes the month in a date.

Examples:

  • {{Format date|1993|02|24}} returns "24 පෙබරවාරි 1993"
  • {{Format date|1993|02|24|08|30}} returns "08:30, 24 පෙබරවාරි 1993"

Note: The template will appear broken when the parameters are left blank (as seen hereinbefore).

See also[සංස්කරණය]

  • {{Date}} (an alternative to this template, using a different syntax)
  • {{Start date}} (using the same syntax, but with the support for microformats)
  • {{Start-date}} (an alternative to the template {{Start date}})
  • {{Format time}} for formatting times only
[edit]

  • {{Currentdate}} – Time, day of week, and date in MDY format and time zone
  • {{Date}} – Date in chosen format
  • {{DATE}} – Month and year, prefixed by "date=" (for use with templates through substitution)
  • {{Now}} – Same as {{Currentdate}} but in a sentence
  • {{Plain now}} – Date in DMY format, and time
  • {{Right now}} – Blue banner with time and current number of Wikipedia articles
  • {{Right now (User message)}} – Orange banner with time and current number of Wikipedia articles
  • {{TODAY}} – Date in DMY


No description.

Template parameters

ParameterDescriptionTypeStatus
Year1 year

The year to render in the date

Example
1997
Auto value
Numbersuggested
Month2 month

The month to render in the date

Example
January
Auto value
Stringsuggested
Day3 day

The day of the month to format in the date

Example
20
Auto value
Stringsuggested
Hour (HH)4 hour hh

the hour to format in the date (if desired)

Example
03
Auto value
Stringoptional
Minute (MM)5 minute mm

The minute to format in the date (if desired)

Example
21
Stringoptional
Second (SS)6 second ss sec

The second to format in the date (if desired)

Example
10
Auto value
Stringoptional
Time zone7 timezone TimeZone tz

A numerical offset from UTC, or 'Z'

Example
+5
Stringoptional
Day first?df dayfirst

If 'y' or 'yes', displays the day before the month

Stringoptional
Time joinertime_joiner

if included, replaces comma in "<time>, <date>" with the value given

Example
on
Stringoptional
Hour formathour_format

Formats hours and whether to render AM/PM or a.m./p.m.

Example
g (7 ... p.m.), G (07 ... PM), h (19), or H (19)
Stringoptional
"https://si.wikipedia.org/w/index.php?title=සැකිල්ල:Format_date/ලේඛය&oldid=449474" වෙතින් සම්ප්‍රවේශනය කෙරිණි