Bản mẫu:Calendar/doc
Đây là một trang con tài liệu dành cho Bản mẫu:Calendar. Nó gồm có các thông tin hướng dẫn sử dụng, thể loại và các nội dung khác không thuộc về phần trang bản mẫu gốc. |
This template displays either a yearly or monthly calendar (from 1970–2037).
Parameters
[sửa mã nguồn]- month
- To display a single month the parameter
month
must be defined. This parameter can be a month name or number, the current month usemonth=current
(next
andlast
are also accepted).
- year
- The parameter
year
sets the year of the calendar the default being the current year.
- format
- To start the week on Monday use either
format=Mon1st
or, to include ISO week numbers,format=iso
. The keywords are case-sensitive.
<< Tháng 11 năm 2024 >> | ||||||
CN | T2 | T3 | T4 | T5 | T6 | T7 |
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
- show_year
- To display the year use
show_year=on
. To show the year after the month useshow_year=with month
.
- txt_pref_m
- This adds a prefix to the month name.
- txt_suff_m
- This adds a suffix to the month name.
- float
- To float the calendar left or right use
float=left
orfloat=right
.
- lk
- To link days, months and years use
lk=on
. - To link days and months use
lk=dm
. - To link months and years use
lk=my
. - To link days and years use
lk=dy
. - To link days only use
lk=d
. - To link months only use
lk=m
. - To link years only use
lk=y
.
- lk_pref
- This adds a prefix to all links.
- lk_pref_d
- This adds a prefix to day links.
- lk_pref_m
- This adds a prefix to month links.
- lk_pref_mnext
- This adds a prefix to the next month's link.
- lk_pref_mprev
- This adds a prefix to the previous month's link.
- lk_suff
- This adds a suffix to all links.
- lk_suff_d
- This adds a suffix to day links.
- lk_suff_m
- This adds a suffix to month links.
- lk_suff_mnext
- This adds a suffix to the next month's link.
- lk_suff_mprev
- This adds a suffix to the previous month's link.
- prevnext
- To add links to the previous and next months use
prevnext=on
.
- title_colour
- Use this to change the background colour of the title bar with name of the month, and the bottom bar (e.g.
title_colour=#2e8b57
).
- week_colour
- Use this to change the colour of the bar listing the days of the week (e.g.
week_colour=#2e8b57
).
- colour
- This is shorthand for both of the above.
- wknum_colour
- Use this to change the background colour of the ISO week numbers, when using
format=iso
(e.g.wknum_colour=#2e8b57
).
- wk5253
- Use
wk5253=on
to start the year with week 52/53, when usingformat=iso
with a year calendar. The only use case for this, is when the year is unknown and it starts with a Saturday. See Common year starting on Saturday as an example.
- EndNote
- This adds text to the bottom bar.
Dữ liệu bản mẫu cho Calendar
Display a year or month calendar
Tham số | Miêu tả | Kiểu | Trạng thái | |
---|---|---|---|---|
Year | year | the ordinal year number of the calendar
| Số | khuyên dùng |
Month | month | whether to display a single month instead of a whole year, and which one
| Chuỗi dài | khuyên dùng |
Show year | show_year | whether to display the year number, and where
| Luận lý | tùy chọn |
Title text | title | text in the top bar | Nội dung | tùy chọn |
End note | EndNote | text in the bottom bar | Nội dung | tùy chọn |
Week format | format | The string to be trimmed and counted
| Chuỗi dài | tùy chọn |
Months per row | col | Display this many months per row (1, 3, 4 or 6 rows)
| Số | tùy chọn |
Months per column | row | Display this many months per column (3 or 4 cols). If set, overrides ‘col’ parameter.
| Số | tùy chọn |
Float side | float | Horizontally align the calendar
| Chuỗi dài | tùy chọn |
Serial navigation | prevnext | Add links to the previous and next months
| Luận lý | tùy chọn |
Background color | colour | Default for Title and Week background
| Chuỗi dài | tùy chọn |
Title background | title_colour | change the background colour of the title bar with name of the month, and the bottom bar
| Chuỗi dài | tùy chọn |
Week background | week_colour | change the colour of the bar listing the days of the week
| Chuỗi dài | tùy chọn |
ISO week numbers background | wknum_colour | change the colour of the bar listing the ISO week numbers
| Chuỗi dài | tùy chọn |
Fixed starting week workaround | wk5253 | start the year with week 52/53, when the first day is a Saturday. | Luận lý | tùy chọn |
Month name prefix | txt_pref_m | Text to add before month names | Chuỗi ngắn | tùy chọn |
Month name suffix | txt_suff_m | Text to add after month names | Chuỗi ngắn | tùy chọn |
Link | lk | whether to automatically link days (d), months (m) and years (y)
| Chuỗi dài | tùy chọn |
Link prefix | lk_pref | Text to add before all links | Chuỗi ngắn | tùy chọn |
Link suffix | lk_suff | Text to add after all links | Chuỗi ngắn | tùy chọn |
Day link prefix | lk_pref_d | Text to add before links to days | Chuỗi ngắn | tùy chọn |
Day link suffix | lk_suff_d | Text to add after links to days | Chuỗi ngắn | tùy chọn |
Month link prefix | lk_pref_m | Text to add before links to months | Chuỗi ngắn | tùy chọn |
Month link suffix | lk_suff_m | Text to add after links to months | Chuỗi ngắn | tùy chọn |
Next link prefix | lk_pref_mnext | Text to add before the link to the next month (or year) | Chuỗi ngắn | tùy chọn |
Next link suffix | lk_suff_mnext | Text to add after the link to the next month (or year) | Chuỗi ngắn | tùy chọn |
Previous link prefix | lk_pref_mprev | Text to add before the link to the previous month (or year) | Chuỗi ngắn | tùy chọn |
Previous link suffix | lk_suff_mprev | Text to add after the link to the next month (or year) | Chuỗi ngắn | tùy chọn |
Examples
[sửa mã nguồn]{{calendar|lk=on|show_year=on|float=right|month=current}}
produces the calendar above. The calendars below are produced by {{calendar}}
and {{calendar|prevnext=true|format=iso|zero=0|row=3}}
, respectively.
<< Tháng 11 năm 2024 >> | ||||||
CN | T2 | T3 | T4 | T5 | T6 | T7 |
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
<< Tháng 11 năm 2024 >> | ||||||
CN | T2 | T3 | T4 | T5 | T6 | T7 |
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
See also
[sửa mã nguồn]Multiple units of time
[sửa mã nguồn]Type | Adjustable | Current | Last | Next |
---|---|---|---|---|
Date and Time | {{time}} | {{Currentdate}} (MDY) {{Plain now}} (DMY) {{Now}} (DMY in a complete sentence) {{Simple now}} |
||
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) |
|||
Timestamp | {{Timestamp}} (Format YYYYMMDDhhmmss) |
Single units of time
[sửa mã nguồn]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}} | |||
DECADE | {{DECADE}} | {{CURRENTDECADE}} | {{LASTDECADE}} | {{NEXTDECADE}} |
CENTURY | {{CENTURY}} | {{CURRENTCENTURY}} | {{LASTCENTURY}} | {{NEXTCENTURY}} |
MILLENNIUM | {{MILLENNIUM}} | {{Currentmillennium}} |
Date and time Templates made for substitution:
[sửa mã nguồn]Month:
{{Lmonth}} produces Bản mẫu:Lmonth
{{Nmonth}} produces Bản mẫu:Nmonth
{{LastMonth}} produces Bản mẫu:LastMonth
{{NextMonth}} produces Bản mẫu:NextMonth
Individual Templates
[sửa mã nguồn]- {{Calendar}}
- {{Calendar clock with Wikipedia stats}}
- {{Clock}}
- {{Digital clock}}
- {{Digital clock and date}}
- Category:Bản mẫu lịch, ngày tháng và thời gian
- Category:Date-computing templates
- Category:Date-computing templates based on current time
- Category:ISO date templates
- Category:Bản mẫu lịch
- Category:Bản mẫu đồng hồ