سانچہ:Calendar date
| اس سانچے میں حسب ذیل لوا ماڈیول زیر استعمال ہے: |
{{Calendar date}} aka {{Moveable date}} is for displaying the کلنڈر تاریخ of holidays or events that move annually, that do not have a fixed day and month of occurrence.
Examples include the Jewish new year حنوکاہ which is based on a non-Gregorian calendar system. The June solstice wobbles celestially.
Usage
[ترمیم]The template requires only two arguments, the holiday/event name (|holiday= or |event= are synonymous) and the year |year= in the Gregorian calendar.
Example:
{{calendar date |holiday=Rosh Hashanah |year=2019}}- Produces:
- Error in {{Calendar date}} - Check
|holiday=invalid calculated date نقص: غلط وقت۔
- Error in {{Calendar date}} - Check
Optionally try |format=infobox in an infobox
Example:
{{Calendar date |holiday=Rosh Hashanah |year=2019 |format=infobox}}- Produces:
- Error in {{Calendar date}} - Check
|holiday=invalid calculated date نقص: غلط وقت۔
- Error in {{Calendar date}} - Check
Options
[ترمیم]Required
- holiday or event
- Name of an available holiday. Ex.
|holiday=Rosh Hashanahor|event=Rosh Hashanah - year
- Year of event. Ex.
|year=2019
Options
- df
- Date Format options can be "dmy", "mdy" or "iso" (
|df=dmy). Defaults are set in Module:Calendar date/events - format
- Use
|format=infoboxin an infobox - cite
- If set to anything (
|cite=) a citation is added.
Adding or editing holidays
[ترمیم]Holidays are configured in Module:Calendar date/events which has additional documentation and examples.
There are two holiday types: "calculator" and "localfile".
calculator - Moveable dates are determined with a calculator plugin. For example نرسنگوں کی عید uses the {{Hebrew year}} calculator:
datatype = "calculator"datasource = "{{#time:Y-m-d|@{{Hebrew year/rhdatum|{{#timel:xjY|YYYY-11-1}}}}-1 days}}"
- When the template runs, it replaces "YYYY" with the value of the
|year=argument, then executes thedatasourcecode. Calculators can be any available on Wikipedia, so long as it accepts a year value and returns a date in ISO format. All calculators are third-party plugins, the template does not do calculations.
localfile - When a calculator is not possible or unavailable, moveable dates can be stored in local files. For example with Tu BiShvat:
datatype = "localfile"datasource = "Module:Calendar date/localfiles/Tu BiShvat"
- The file Module:Calendar date/localfiles/Tu BiShvat contains a static list of dates.
wikidata - <to be developed - see talk page for more info>
Holidays with multiple aliases
[ترمیم]If a holiday has multiple aliases, and it's desired the template support them with the |holiday= argument, create multiple entries in Module:Calendar date/events one for each name.
Dynamic dates
[ترمیم]The |year= can accept templates.
- For example, to show the current year for Tu BiShvat use {{CURRENTYEAR}}:
{{Moveable date |holiday=Tu BiShvat |year={{CURRENTYEAR}}}}
- Produces
- لوا خطا package.lua میں 80 سطر پر: module 'Module:Calendar date/localfiles/Tu BiShvat' not found۔
Other useful templates are {{LASTYEAR}} and {{NEXTYEAR}}.
Combined they can be used in infoboxes to fully automate updates, example from the حنوکاہ infobox:
|date{{LASTYEAR}} = {{Moveable date |holiday=Hanukkah |year={{LASTYEAR}} |format=infobox |cite=}}|date{{CURRENTYEAR}} = {{Moveable date |holiday=Hanukkah |year={{CURRENTYEAR}} |format=infobox}}|date{{NEXTYEAR}} = {{Moveable date |holiday=Hanukkah |year={{NEXTYEAR}} |format=infobox}}|date{{NEXTYEAR|2}} = {{Moveable date |holiday=Hanukkah |year={{NEXTYEAR|2}} |format=infobox}}
Offset date
[ترمیم]An offset date can be calculated for a given moveable date using #time parser function.
- For example, to show the date of the Friday following عید صعود:
{{Moveable date |holiday=Ascension Thursday |df=dM |year={{CURRENTYEAR}}}}{{#time: d M Y| {{Moveable date |holiday=Ascension Thursday |df=d |year={{CURRENTYEAR}}}} + 1 day}}- Produces
- 14 مئی 2026
- نقص: غلط وقت۔
Tracking categories
[ترمیم]VisualEditor TemplateData
[ترمیم]What is this? See https://www.mediawiki.org/wiki/Help:TemplateData
A template for displaying moving calendar dates
| پیرامیٹر | وضاحت | طرز | حالت | |
|---|---|---|---|---|
| Name of holiday/event | holiday | The name of the holiday or event
| اِسٹرنگ | مطلوب |
| Holiday year | year | The year to display the holiday dates for
| اِسٹرنگ | مطلوب |
| Display format option | format | Options for controlling display output such as for an infobox
| اِسٹرنگ | اختیاری |
| Date Format | df | Date format to use when displaying dates
| اِسٹرنگ | اختیاری |
External links
[ترمیم]- Simple holidays by Mark Seemann
| اوپر دی گئی دستاویز صفحہ سانچہ:Calendar date/دستاویز سے شامل کی گئی ہے۔ (ترمیم | تاریخچہ) صارفین سانچہ کے تختہ مشق (تخلیق | آئینہ) اور ثابتات (تخلیق) میں تجربات کرسکتے ہیں۔ براہ کرم /دستاویز کے ذیلی صفحہ پر زمرہ جات شامل فرمائیں۔ اس سانچہ کے ذیلی صفحات۔ |