Test

Debug Output: Hijri full years to days: 512059 days (including 529 leap days) Hijri full months to days: 512207 days Length of current Hijri month: 29 days Total days since Hijri epoch: 512213 days

Destination year: 2024, Destination month: 12, Destination date: 7

Example 0: Hijri to Gregorian

Parameters:

  • Origin_Calendar = Hijri
  • Destination_Calendar = Gregorian
  • Origin_Year = 1446
  • Origin_Month = 7
  • Origin_Date = 7

Template Call: Debug Output: Hijri full years to days: 512059 days (including 529 leap days) Hijri full months to days: 512236 days Length of current Hijri month: 30 days Total days since Hijri epoch: 512242 days

Destination year: 2025, Destination month: 1, Destination date: 5

Expected Result:

  • Destination year: 2025
  • Destination month: 1
  • Destination date: 7
  • Destination day: Tuesday

Example 1: Hijri to Gregorian

Parameters:

  • Origin_Calendar = Hijri
  • Destination_Calendar = Gregorian
  • Origin_Year = 1445
  • Origin_Month = 4
  • Origin_Date = 10

Template Call: Debug Output: Hijri full years to days: 511705 days (including 529 leap days) Hijri full months to days: 511794 days Length of current Hijri month: 29 days Total days since Hijri epoch: 511803 days

Destination year: 2023, Destination month: 10, Destination date: 24

Expected Result:

  • Destination year: 2024
  • Destination month: 2
  • Destination date: 10
  • Destination day: Sunday

Example 2: Gregorian to Hijri

Parameters:

  • Origin_Calendar = Gregorian
  • Destination_Calendar = Hijri
  • Origin_Year = 2024
  • Origin_Month = 2
  • Origin_Date = 10

Template Call: Debug Output: Gregorian to JDN: 2460351 Calculated JDN: 2460351 Hijri date -> Year: 1445, Month: 8, Day: 1

Destination year: 1445, Destination month: 8, Destination date: 1

Expected Result:

  • Destination year: 1445
  • Destination month: 4
  • Destination date: 10
  • Destination day: N/A

Example 3: Hijri to Gregorian

Parameters:

  • Origin_Calendar = Hijri
  • Destination_Calendar = Gregorian
  • Origin_Year = 1400
  • Origin_Month = 1
  • Origin_Date = 1

Template Call: Debug Output: Hijri full years to days: 495758 days (including 512 leap days) Hijri full months to days: 495758 days Length of current Hijri month: 30 days Total days since Hijri epoch: 495758 days

Destination year: 1979, Destination month: 11, Destination date: 19

Expected Result:

  • Destination year: 1979
  • Destination month: 10
  • Destination date: 20
  • Destination day: Saturday

Example 4: Gregorian to Hijri

Parameters:

  • Origin_Calendar = Gregorian
  • Destination_Calendar = Hijri
  • Origin_Year = 2000
  • Origin_Month = 1
  • Origin_Date = 1

Template Call: Debug Output: Gregorian to JDN: 2451547 Calculated JDN: 2451547 Hijri date -> Year: 1420, Month: 9, Day: 27

Destination year: 1420, Destination month: 9, Destination date: 27

Expected Result:

  • Destination year: 1420
  • Destination month: 9
  • Destination date: 23
  • Destination day: N/A

Example 5: Invalid Input

Parameters:

  • Origin_Calendar = Hijri
  • Destination_Calendar = Gregorian
  • Origin_Year =
  • Origin_Month =
  • Origin_Date =

Template Call: خطأ لوا في وحدة:CalendarConversion على السطر 17: attempt to perform arithmetic on local 'year' (a nil value).

Expected Result: Invalid parameters: please provide all required inputs.

Example 6: Conversion Not Supported

Parameters:

  • Origin_Calendar = Coptic
  • Destination_Calendar = Farsi
  • Origin_Year = 1738
  • Origin_Month = 5
  • Origin_Date = 20

Template Call: Conversion not supported.

Expected Result: Conversion not supported yet for these calendars.

Maplink sandbox (Marefadata ids)

Temporary checks for وحدة:Mapframe/sandbox via Map. Production Map is unchanged. Article ياقوتيا still has leftover Wikidata id=Q6605.

Same parameters as enwiki / ياقوتيا: frame=yes|frame-width=265|zoom=2|type=line.

A. Production maplink, leftover Wikidata id=Q6605 (broken center)

Expected: frame at Agaléga (−10.4, 56.6). OSM line may be Sakha (off-frame at zoom 2).

خريطة
prod id=Q6605

B. Sandbox, id=MQ48127 (Sakha on Marefadata)

Expected: center ~66.4 N, 129.2 E and red Sakha outline (OSM via P1=Q6605).

خريطة
sandbox id=MQ48127

C. Sandbox, id=Q48127 without M

Expected: same as B (normalize is a no-op; P1 still feeds OSM).

خريطة
sandbox id=Q48127

D. Sandbox, leftover id=Q6605 (still wrong; Q6605 exists as Agaléga)

Expected: center Agaléga. OSM uses P1=Q196042 (Agaléga), not Sakha. Leftover Wikidata ids must be replaced in wikitext.

خريطة
sandbox leftover Q6605

E. Sandbox, id=MQ6605 (Agaléga, intentional Marefadata id)

Expected: center Agaléga; OSM via P1=Q196042 if a shape exists.

خريطة
sandbox id=MQ6605