مندرجات کا رخ کریں

سانچہ:YEAR

آزاد دائرۃ المعارف، ویکیپیڈیا سے

Usage

[ترمیم]

{{YEAR|string formatted as a valid date}}

Specify optional parameter {{{2}}} to get soft error rather than a hard {{error}} سانچہ:YEAR/demo سانچہ:YEAR/demo سانچہ:YEAR/demo سانچہ:YEAR/demo سانچہ:YEAR/demo سانچہ:YEAR/demo سانچہ:YEAR/demo سانچہ:YEAR/demo

Reports "Error" if given bad input:

سانچہ:YEAR/demo
      Reason for the error: there are not 14 months. سانچہ:YEAR/demo
      Reason for the error: no month has 61 days. سانچہ:YEAR/demo
      Reason for the error: there is no such month name. سانچہ:YEAR/demo
      Reason for the error: no date information to parse. سانچہ:YEAR/demo
      Reason for the error: includes extraneous content.

If used with a year range, it returns only the first match:

This presently only works when the year range is specified with a hyphen; if correctly given with an en dash, it reports an error (this will probably not be fixed, because handling ranges is not the template's function; that it kinda-sorta works on something like 1999-2001 with a hyphen is basically just an accident):

If used without input, it simply outputs the current year:

It can be cleanly substituted for this purpose. If fed invalid data when substituted, it produces a larger, red error.