टेम्पलेट:Format date
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
Multiple units of time
[संपादन करीं]Type | Adjustable | Current | Last | Next |
---|---|---|---|---|
Date and Time | {{time}} | {{Currentdate}} (MDY) {{Plain now}} (DMY) {{Now}} (Plan now in as sentence) |
||
Date Only | {{Dateonly}} {{Datedow}} (Has the day of the week) |
{{Date}} (Chose format) {{DATE}} (prefixed by date=) {{TODAY}} (DMY) |
{{Yesterday}} {{Day-1}} |
{{Tomorrow}} {{Day+1}} |
Time only | {{Timeonly}} | {{CURRENTTIME}} (12 h format) {{CURRENTTIME24}} (24 h format) |
||
Banners | {{Right now}} (Blue with time and number of Wikipedia articles) {{Right now (User message)}} (Orange with time and number of Wikipedia articles |
|||
Timestamp | {{Timestamp}} (Format YYYYMMDDHHMMSS) |
Single units of time
[संपादन करीं]Unit of time | Adjustable | Current | Last | Next |
---|---|---|---|---|
SECOND | {{CURRENTSECOND}} | |||
MINUTE | {{CURRENTMINUTE}} | |||
HOUR | {{Currenthour}} | {{Hour-1}} | {{Hour+1}} | |
WEEK | {{CURRENTWEEKOFYEAR}} {{CURRENTWEEKOFMONTH}} |
|||
Day of Week | {{Dow}} | {{CURRENTWEEKDAYNAME}} {{CURRENTWEEKDAYABBREV}} {{CURRENTWEEKDAY}} |
{{LASTWEEKDAYNAME}} {{LASTWEEKDAYABBREV}} |
{{NEXTWEEKDAYNAME}} {{NEXTWEEKDAYABBREV}} |
MONTH | {{MONTHNAME}} {{MONTHABBREV}} {{MONTHNUMBER}} {{MONTH}} (zero padded) |
{{Currentmonth}} {{CURRENTMONTHABBREV}} {{CURRENTMONTHNUMBER}} {{CURRENTMONTHDAYS}} |
{{LASTMONTH}} (Can make not zero-padded) {{LASTMONTHNAME}} {{LASTMONTHABBR}} |
{{NEXTMONTH}} (Can make not zero-padded) {{NEXTMONTHNAME}} {{NEXTMONTHABBR}} |
Day of Month | {{Currentday}} | |||
YEAR | {{CURRENTYEARCC}} {{CURRENTYEARYY}} {{CURRENTISOYEAR}} {{CURRENTYEAR}} |
{{LASTYEAR}} | {{NEXTYEAR}} | |
Day of Year | {{CURRENTDAYOFYEAR}} | |||
CENTURY | {{CENTURY}} | {{CURRENTCENTURY}} | {{LASTCENTURY}} | {{NEXTCENTURY}} |
MILLENNIUM | {{MILLENNIUM}} | {{Currentmillennium}} |
Date and time Templates made for substitution:
[संपादन करीं]Month:
{{Lmonth}} produces अक्टू
{{Nmonth}} produces दिस
{{LastMonth}} produces अक्टूबर 2024
{{NextMonth}} produces दिसंबर 2024
Individual Templates
[संपादन करीं]- {{Calendar}}
- {{Calendar clock with Wikipedia stats}}
- {{Clock}}
- {{Digital clock}}
- {{Digital clock and date}}
Categories of Templates
[संपादन करीं]- Category:Time, date and calendar templates
- Category:Date-computing templates
- Category:Date-computing templates based on current time
- Category:ISO date templates
- Category:Calendar templates
- Category:Clock templates
No description.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Year | 1 year | The year to render in the date
| Number | suggested |
Month | 2 month | The month to render in the date
| String | suggested |
Day | 3 day | The day of the month to format in the date
| String | suggested |
Hour (HH) | 4 hour hh | the hour to format in the date (if desired)
| String | optional |
Minute (MM) | 5 minute mm | The minute to format in the date (if desired)
| String | optional |
Second (SS) | 6 second ss sec | The second to format in the date (if desired)
| String | optional |
Time zone | 7 timezone TimeZone tz | A numerical offset from UTC, or 'Z'
| String | optional |
Day first? | df dayfirst | If 'y' or 'yes', displays the day before the month | String | optional |
Time joiner | time_joiner | if included, replaces comma in "<time>, <date>" with the value given
| String | optional |
Hour format | hour_format | Formats hours and whether to render AM/PM or a.m./p.m.
| String | optional |
परिचय खातिर ऊपर दिहल गइल बिबरनलेख के टेम्पलेट:Format date/doc से ट्रांसक्लूड क के इहाँ देखावल जा रहल बाटे। (संपादन करीं | इतिहास देखीं) संपादक लोग एह टेम्पलेट के अभ्यासपन्ना (सैंडबाक्स) (बनाईं | मिरर करीं) आ टेस्टकेस (बनाईं) पन्ना सभ पर अभ्यास आ प्रयोग (टेस्टिंग) क सकत बाटे। अनुरोध बा कि अगर श्रेणी जोड़े के होखे तब /doc उपपन्ना (सबपेज) पर जोड़ल जाय। एह टेम्पलेट के उपपन्ना (सबपेज) देखीं। |