မာတိကာသို့ ခုန်သွားရန်

တမ်းပလိတ်:Date table sorting/doc

ဝီကီပီးဒီးယား မှ

ဤတမ်းပလိတ်အား လတ်တလောတွင် အင်္ဂလိပ်ရက်စွဲဖြင့်သာ သုံးစွဲနိုင်ပြီး မြန်မာရက်စွဲဖြင့် ဖော်ပြမည်ဖြစ်သည်။

ပါရာမီတာများ

[ပြင်ဆင်ရန်]
The year, month and day can either be entered separately or as a single date.
{{Date table sorting|year|month|day|BC}} {{Date table sorting|date}}
  • 1st parameter – Year (optional if month is given)
    • Positive number (1 to 999,999,999,999) represent years AD or BC (dependant on the fourth parameter).
    • Negative numbers (−1 to −999,999,999,999) represent years BC (without the fourth parameter).
    • Year numbers must not contain commas or other formatting.
  • 2nd parameter – Month (optional if the day is not given either)
    • Full month name – e.g. February
    • Abbreviated month name – e.g. Feb
    • Month number – (either zero-padded or not) e.g. 2 or 02
  • 3rd parameter – Day (optional)
    • Day number – (either zero-padded or not) e.g. 7 or 07
  • 4th parameter – (optional)
    • May be BC, AD, BCE or CE
    • Used with a positive year number
  • 1st parameter – the full date
    • By default YYYY-MM-DD format becomes month-day-year format and DD-MM-YYYY format becomes day-month-year while other formats remain in the order they are input.
    • Abbreviated months are accepted and are abbreviated in the output.
    • Capitalisation and comma mistakes are corrected.
    • A single number is interpreted as a year, otherwise the date is parsed by the module. The following formats are accepted:
      • YYYY-MM-DD
      • DD-MM-YYYY
      • DD Month YYYY
      • Month DD, YYYY
      • YYYY-MM
      • DD Month
      • Month DD
      • Month YYYY
      • YYYY
      • Month
    • Day and month numbers may be 1 or 2 digits, and year numbers may only be 3 or 4 digits. If you need to input a number less than 1000, use leading zeroes (e.g. "0700").
    • BC years can only be parsed if the date is only the year number.
    • If you need to include the day or month for BC years or years greater than 9999, you must use separate parameters for year, month and day.


Examples
input style input code hidden sort key visible output
{{Date table sorting|year}} {{Date table sorting|1893}} ၁၈၉၃
{{Date table sorting|-89}} ၈၉ BC
{{Date table sorting|-10000}} ၁၀၀၀၀ BC
{{Date table sorting|-1}} ၁ BC
{{Date table sorting| 1}} (Note that year 0 does not exist and gives error message)
{{Date table sorting|month}} {{Date table sorting|Oct}} အောက်
{{Date table sorting|month year}} {{Date table sorting|February 1767}} ဖေဖော်ဝါရီ ၁၇၆၇
{{Date table sorting|day month year}} {{Date table sorting|12 Aug 1987}} ၁၂ ဩ ၁၉၈၇
{{Date table sorting|month day, year}} {{Date table sorting|July 1, 1867}} ၁ ဇူလိုင် ၁၈၆၇
{{Date table sorting|day month}} {{Date table sorting|25 October}} ၂၅ အောက်တိုဘာ
{{Date table sorting|month day}} {{Date table sorting|Jan 1}} ၁ ဇန်
{{Date table sorting|YYYY-MM-DD}} {{Date table sorting|2014-12-09}} ၉ ဒီဇင်ဘာ ၂၀၁၄
{{Date table sorting|DD-MM-YYYY}} {{Date table sorting|15-05-2019}} ၁၅ မေ ၂၀၁၉
{{Date table sorting|year|month}} {{Date table sorting|1990|10}} အောက်တိုဘာ ၁၉၉၀
{{Date table sorting|1980|Dec}} ဒီ ၁၉၈၀
{{Date table sorting|1970|August}} ဩဂုတ် ၁၉၇၀
{{Date table sorting|year|month|day}} {{Date table sorting|2024|Jun|12}} ၁၂ ဇွန် ၂၀၂၄
{{Date table sorting|-204|11|22}} ၂၂ နိုဝင်ဘာ ၂၀၄ BC
{{Date table sorting|year|month|day|era}} {{Date table sorting|44|3|15|BC}} ၁၅ မတ် ၄၄ BC
{{Date table sorting|94|Oct|17|AD}} ၁၇ အောက် ၉၄
{{Date table sorting||month}} {{Date table sorting||May}} မေ
{{Date table sorting||month|day}} {{Date table sorting||Sep|12}} ၁၂ စက်

Using format produces a format that depends on, but is not necessarily equal to the format of the supplied date. The format parameter can take nine values.

Examples
value function input code hidden sort key visible output
  format depends on the input {{Date table sorting|26 Jan 1788}} ၂၆ ဇန် ၁၇၈၈
{{Date table sorting|March 12, 1557}} ၁၂ မတ် ၁၅၅၇
{{Date table sorting|1975-02-13}} ၁၃ ဖေဖော်ဝါရီ ၁၉၇၅
dmy displays the date in day-month-year format {{Date table sorting|Sep 13, 1888|format=dmy}} ၁၃ စက် ၁၈၈၈
{{Date table sorting|1983-01-03|format=dmy}} ၃ ဇန်နဝါရီ ၁၉၈၃
dm displays only the day and month in day-month format {{Date table sorting|Feb 26, 1788|format=dm}} ၂၆ ဖေ
{{Date table sorting|2020-10-15|format=dm}} ၁၅ အောက်တိုဘာ
mdy displays the date in month-day-year format {{Date table sorting|August 31, 1901|format=mdy}} ဩဂုတ် ၃၁, ၁၉၀၁
{{Date table sorting|2006-11-08|format=mdy}} နိုဝင်ဘာ ၈, ၂၀၀၆
md displays only the day and month in month-day format {{Date table sorting|26 Jun 1988|format=md}} ဇွန် ၂၆
{{Date table sorting|2002-02-27|format=md}} ဖေဖော်ဝါရီ ၂၇
my displays only the month and year in month-year format {{Date table sorting|16 November 1488|format=my}} နိုဝင်ဘာ ၁၄၈၈
d displays only the day {{Date table sorting|6 July 1666|format=d}}
m displays only the month {{Date table sorting|1980-02-12|format=m}} ဖေဖော်ဝါရီ
y displays only the year {{Date table sorting|-26|Jan|18|format=y}} ၂၆ BC
hide hides the date {{Date table sorting|15 October 1800|format=hide}}

There are two ways of abbreviating the month name.

  1. Directly input an abbreviated month name.
  2. Use the abbr=on parameter.
Examples
abbreviation method input code hidden sort key visible output
none {{Date table sorting|2000-01-01}} ၁ ဇန်နဝါရီ ၂၀၀၀
{{Date table sorting|2000|1|1}} ၁ ဇန်နဝါရီ ၂၀၀၀
{{Date table sorting|1 January 2000}} ၁ ဇန်နဝါရီ ၂၀၀၀
{{Date table sorting|2000|January|1}} ၁ ဇန်နဝါရီ ၂၀၀၀
abbreviated input {{Date table sorting|1 Jan 2000}} ၁ ဇန် ၂၀၀၀
{{Date table sorting|2000|Jan|1}} ၁ ဇန် ၂၀၀၀
abbr=on {{Date table sorting|1 January 2000|abbr=on}} ၁ ဇန် ၂၀၀၀
{{Date table sorting|2000|January|1|abbr=on}} ၁ ဇန် ၂၀၀၀
{{Date table sorting|2000-01-01|abbr=on}} ၁ ဇန် ၂၀၀၀
{{Date table sorting|2000|1|1|abbr=on}} ၁ ဇန် ၂၀၀၀

Additional sort key

[ပြင်ဆင်ရန်]

In case two dates in a table are identical they may be ordered using the addkey parameter.

Examples
input code hidden sort key visible output
{{Date table sorting|2010-10-10|addkey=3}} ၁၀ အောက်တိုဘာ ၂၀၁၀
{{Date table sorting|2010-10-09}} ၉ အောက်တိုဘာ ၂၀၁၀
{{Date table sorting|2010-10-10|addkey=1}} ၁၀ အောက်တိုဘာ ၂၀၁၀
{{Date table sorting|2010-10-10}} ၁၀ အောက်တိုဘာ ၂၀၁၀
{{Date table sorting|2010-10-10|addkey=4}} ၁၀ အောက်တိုဘာ ၂၀၁၀
{{Date table sorting|2010-10-11}} ၁၁ အောက်တိုဘာ ၂၀၁၀
{{Date table sorting|2010-10-10|addkey=2}} ၁၀ အောက်တိုဘာ ၂၀၁၀

To turn off the suppression of word wraps, use the nowrap=off parameter.