Skip to content

Commit

Permalink
Merge pull request #2 from khalid-hussain/Bibliography
Browse files Browse the repository at this point in the history
fix: added admonitions and minor edits
  • Loading branch information
khawarizmus authored Jun 2, 2024
2 parents 2ee52bb + e9ba2e1 commit b96918c
Show file tree
Hide file tree
Showing 8 changed files with 122 additions and 38 deletions.
66 changes: 45 additions & 21 deletions content.typ
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#import "@preview/outrageous:0.1.0"
#import "@preview/note-me:0.2.1": *

#let gnote(text) = admonition(
title: "Note",
color: color.green.darken(40%))[#text]

// Quotes use single quote
= Introduction
Expand Down Expand Up @@ -64,18 +69,18 @@ Tabular Hijri calendars employ a systematic arrangement of months, alternating b
The structure of Tabular Hijri calendars is cyclical, encompassing a 30-year period. Within this cycle, there are 19 common years, each with a duration of 354 days, and 11 leap years, each lasting 355 days. The aggregate of days over the entire cycle amounts to 10,631. The allocation of leap years is methodical, adhering to one of four distinct schemas:

#figure(
table(
columns: 2,
[Type],[Intercalary years with 355 days inserted at year No],
[Type I],[2, 5, 7, 10, 13, #text(red, weight: "bold")[15], 18, 21, 24, 26, 29],
[Type II], [2, 5, 7, 10, 13, 16, 18, 21, 24, 26, 29],
[Type III], [2, 5, 8, 10, 13, 16, 19, 21, 24, #text(blue, weight: "bold")[27], 29],
[Type IV], [2, 5, 8, #text(orange, weight: "bold")[11], 13, 16, 19, 21, 24, 27, #text(orange, weight: "bold")[30]]
),
caption: [
The highlighted years in each schema signefies the difference of each schema relative to Type II.
]
)
table(
columns: 2,
[Type],[Intercalary years with 355 days \ inserted at year Nos.],
[Type I],[2, 5, 7, 10, 13, #text(red, weight: "bold")[15], 18, 21, 24, 26, 29],
[Type II], [2, 5, 7, 10, 13, 16, 18, 21, 24, 26, 29],
[Type III], [2, 5, 8, 10, 13, 16, 19, 21, 24, #text(blue, weight: "bold")[27], 29],
[Type IV], [2, 5, 8, #text(orange, weight: "bold")[11], 13, 16, 19, 21, 24, 27, #text(orange, weight: "bold")[30]],
))

#gnote[
The highlighted years in each schema signifies the difference of each schema relative to Type II.
]

Among these, Type II is most prevalent and is the exclusive choice in the context of the International Components for Unicode (ICU). Specifically, ICU employs the Type II schema for its #text(style: "italic")[islamic-civil] and #text(style: "italic")[islamic-tbla] calendars, though each calendar operates on its distinct epoch, differentiating their respective computations and applications.

Expand Down Expand Up @@ -107,12 +112,12 @@ Arithmetical Hijri calendars calculate Hijri dates using predetermined arithmeti

An instance of an arithmetical Hijri calendar is the #text(style: "italic")[islamic] calendar as implemented by the ICU. While this calendar provides a structured and algorithmic approach to converting Gregorian dates to Hijri dates, the implementation has certain limitations:

*Bounded accuracy:* The algorithm uses a rough estimation method, which is primarily effective within a specific range of years. It is noted in the implementation that this method is roughly accurate for Gregorian years 1846-2138, with an estimated error rate of 3% outside this range.
*Bounded accuracy:* The algorithm uses a rough estimation method, which is primarily effective within a specific range of years. It is noted in the implementation that this method is roughly accurate for Gregorian years 1846-2138, with an estimated error rate of 3% outside this range.#footnote[https://github.com/unicode-org/icu/blob/main/icu4c/source/i18n/islamcal.cpp#L572]

// source: https://github.com/unicode-org/icu/blob/main/icu4c/source/i18n/islamcal.cpp#L572


*Implementation inaccuracies:* The current implementation inaccurately handles negative years, which are years before the Hijra. Additionally, months can potentially have up to 31 days, deviating from the actual lunar month length of 29 or 30 days. It can also have years with 353 days, which deviates from the Hijri year length of 354 or 355 days, making it incompatible with the HWC.
*Implementation inaccuracies:* The current implementation inaccurately handles negative years, which are years before the Hijra. Additionally, months can potentially have up to 31 days, deviating from the actual lunar month length of 29 or 30 days. It can also have years with 353 days, which deviates from the Hijri year length of 354 or 355 days, making it incompatible with the HWC.#footnote[https://github.com/unicode-org/icu/blob/main/icu4c/source/i18n/islamcal.cpp#L229]

// source: https://github.com/unicode-org/icu/blob/main/icu4c/source/i18n/islamcal.cpp#L229

Expand Down Expand Up @@ -162,7 +167,9 @@ The conversion from ISO weekday numbering to HWC weekday numbering involves a si

This methodical approach effectively recalibrates the ISO weekday numbering to align with the HWC's structure, ensuring that each day of the week is accurately represented in the context of the HWC.

The followin table outlines the relationship between HWC and ISO weekday numbering systems.
#pagebreak()

The following table outlines the relationship between HWC and ISO weekday numbering systems.

#table(
columns: 6,
Expand Down Expand Up @@ -199,6 +206,8 @@ This adjustment ensures that each HWC year aligns consistently with the characte
// we chose tuesday because weeks should start on saturday
// weeks should start on satruday beacuse of relegious conciderations (friday last day)

#pagebreak()

== Formatting the Hijri Week Date System <formatting-the-hijri-week-date-system>

In the HWC, dates are structured to ensure clarity and standardization, closely paralleling the format utilized by the ISO 8601 week-numbering system. The format components are as follows:
Expand Down Expand Up @@ -229,7 +238,7 @@ When working with different systems that use the HWC or when using different und

By associating the Hijri week date with the underlying Hijri calendar, the corresponding Hijri date can be determined precisely, ensuring consistency and accuracy in date representation across different systems and contexts.

For example, the Hijri week date *`1445-W23-6[u-ca=islamic-umalqura]`* specifies that the underlying Hijri calendar used is the Umm Al-Qura calendar. (This calendar notation is also used by the RFC 9557.)
For example, the Hijri week date *`1445-W23-6[u-ca=islamic-umalqura]`* specifies that the underlying Hijri calendar used is the Umm Al-Qura calendar. (This calendar notation is also used by the RFC 9557@igalia2024rfc)
// as seen in : https://datatracker.ietf.org/doc/html/rfc9557#section-5


Expand Down Expand Up @@ -343,6 +352,8 @@ The #link(<disambiguating-Hijri-Year-from-Hijri-Week-Year>)[Hijri week year] con
- It may start as early as the 23rd of Dhu al-Hijja (year-ending-29) or the 24th of Dhu al-Hijja (year-ending-30).
- The final day can be as late as the 3rd of Muharram of the subsequent underlying Hijri year.

#pagebreak()

== Characteristics of the Final Tuesday in HWC year

The last Tuesday of the underlying Hijri year always aligns with the final week of the HWC year, either week 50 or week 51. This day is characterized by the following properties:
Expand Down Expand Up @@ -370,7 +381,11 @@ The last week's pivot day marks a critical reference point in the HWC, occurring
- It consistently occurs during the final week of the HWC year, either week 50 or week 51.
- It is precisely seven days prior to the 4th of Muharram in the subsequent year.

*Note:* The occurrence of the last week's pivot day falls within the final week of the HWC year facilitates the determination of the total number of weeks in that year. This can be achieved determining the ordinal day number of the last week's pivot day, then dividing it by 7 and applying a ceiling function to round up to the nearest whole number.
#gnote[
The occurrence of the last week's pivot day falls within the final week of the HWC year facilitates the determination of the total number of weeks in that year. This can be achieved determining the ordinal day number of the last week's pivot day, then dividing it by 7 and applying a ceiling function to round up to the nearest whole number.
]

#pagebreak()

// = Other Days in the First Month of the Hijri Year
== Week Allocation for Initial Days of Muharram
Expand All @@ -388,22 +403,31 @@ The initial days of Muharram, the first month of the Hijri year, have a structur
== Example of Hijri Year Ending 30 days

#figure(
image("images/table-01.jpg", width: 80%),
image("images/table-01-fixed.png", width: 80%),
caption: [
Distribution of the weeks at the start of a year where the ending Hijri year (previous year) ends with the last month having 30 days.
],
)

*Note*: It must not be assumed that the final month (month 12) being 30 days represents a leap-year in all Hijri calendars, because non-tabular calendars such as the Umm Al-Qura calendar can have the extra day needed to make-up a leap year inserted at the end of any of the other 29-day months.
#gnote[
It must not be assumed that the final month (month 12) being 30 days represents a leap-year in all Hijri calendars, because non-tabular calendars such as the Umm Al-Qura calendar can have the extra day needed to make-up a leap year inserted at the end of any of the other 29-day months.
]

#pagebreak()

== Example of Hijri Year Ending 29 days

#figure(
image("images/table-02.jpg", width: 80%),
image("images/table-02-fixed.png", width: 80%),
caption: [
Distribution of the weeks at the start of a year where the ending Hijri year (previous year) ends with the last month having 29 days.
],
)

*Note*: The year ending with a 29-day month could be a common year or a leap year as non-tabular calendars such as the Umm Al-Qura calendar can have the extra day needed to make-up a leap year inserted at the end of any of the other 29-day months.
#gnote[
The year ending with a 29-day month could be a common year or a leap year as non-tabular calendars such as the Umm Al-Qura calendar can have the extra day needed to make-up a leap year inserted at the end of any of the other 29-day months.
]

#v(1fr)

#bibliography("ref.bib", style: "chicago-fullnotes")
File renamed without changes
File renamed without changes
Binary file added images/table-01-fixed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/table-02-fixed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions main.typ
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#import "layout.typ": title, subtitle, authors, affiliations, abstract, margins, publishDate, keywords
#import "lapreprint.typ": template


#show: template.with(
title: title,
subtitle: subtitle,
Expand Down
57 changes: 57 additions & 0 deletions ref.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
@article{igalia2024rfc,
title={RFC 9557 Date and Time on the Internet: Timestamps with Additional Information},
author={Igalia, SL},
year={2024}
}

@techreport{rfc1654,
AUTHOR = "Yakov Rekhter and Tony Li",
TITLE = "{A Border Gateway Protocol 4 (BGP-4)}",
HOWPUBLISHED = {Internet Requests for Comments},
TYPE="{RFC}",
NUMBER=1654,
PAGES = {1-56},
YEAR = {1995},
MONTH = {July},
ISSN = {2070-1721},
PUBLISHER = "{RFC Editor}",
INSTITUTION = "{RFC Editor}",
URL={http://www.rfc-editor.org/rfc/rfc1654.txt}
}

@techreport{CitekeyTechreport,
title = "ISO 8601-1:2019(en): Date and time — Representations for information interchange",
author = "ISO/TC 154",
institution = "ISO",
address = "Vernier, Geneva",
year = 2019,
month = feb
}

@misc{islamcal,
title = "International Components for Unicode: {islamcal.cpp}",
author = "{Unicode, Inc.}",
url="https://github.com/unicode-org/icu/blob/main/icu4c/source/i18n/islamcal.cpp",
howpublished = "\url{https://github.com/unicode-org/icu/blob/main/icu4c/source/i18n/islamcal.cpp}",
year = 2024,
note = "Accessed: 2024-06-02"
}

@misc{islamcal572,
title = "International Components for Unicode: {islamcal.cpp}",
author = "{Unicode, Inc.}",
howpublished = "\url{https://github.com/unicode-org/icu/blob/main/icu4c/source/i18n/islamcal.cpp#L572}",
year = 2024,
note = "Accessed: 2024-06-02"
}

@misc{islamcal229,
title = "International Components for Unicode: {islamcal.cpp}",
author = "{Unicode, Inc.}",
howpublished = "\url{https://github.com/unicode-org/icu/blob/main/icu4c/source/i18n/islamcal.cpp#L229}",
year = 2024,
note = "Accessed: 2024-06-02"
}


https://www.iso.org/obp/ui/en/#iso:std:iso:8601:-1:ed-1:v1:en
36 changes: 19 additions & 17 deletions terms.typ
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
#import "@preview/gloss-awe:0.0.5": *
#import "@preview/note-me:0.2.1": *

#set quote(quotes: false, block: true)
#set terms(separator: [: ])

#let gnote(text) = admonition(
title: "Note",
color: color.green.darken(40%))[#text]

// done
/ Hijri calendar: A lunar calendar widely used in the Muslim world. It is based on the lunar months, with a year of 12 lunar months lasting either 354 or 355 days, making it shorter than the Gregorian calendar. #label("hijri-calendar")

/ common year: In the #link("hijri-calendar")[Hijri calendar] a calendar year that has 354 calendar days is a common year. In the Gregorian calendar a calendar year that has 365 calendar days is a common year.

/ leap year: In the #link("hijri-calendar")[Hijri calendar] a calendar year that has 355 calendar days is a leap year. In the Gregorian calendar a calendar year that has 366 calendar days is a leap year.

#quote[Note: It must not be assumed that the final month (month 12) being 30 days represents a leap-year in all Hijri calendars because non-tabular calendars such as Umm Al-Qura calendar can have the extra day needed to make-up a leap year inserted at the end of any of the other 29-day months]
#gnote[It must not be assumed that the final month (month 12) being 30 days represents a leap-year in all Hijri calendars because non-tabular calendars such as Umm Al-Qura calendar can have the extra day needed to make-up a leap year inserted at the end of any of the other 29-day months]

// should we introduce an equivalaent rule for hijri?

// Note: A leap year is a calendar year whose year number is divisible by four and is not a centennial year, or a centennial year whose year number is divisible by four hundred.

/ Hijri week calendar: A calendar based on an unbounded series of contiguous calendar weeks that uses the time scale unit of calendar week as its basic unit to represent a calendar year, according to the rule that the first calendar week of a calendar year is the week including the first Tuesday of that year, and that the last one is the week immediately preceding the first calendar week of the next calendar year #label("hijri-week-calendar")

#quote[
Note: Hijri week calendar (HWC) is not equivalent to a Hijri calendar.
]
#gnote[
Hijri week calendar (HWC) is not equivalent to a Hijri calendar.

#quote[
Note: This rule is based on the principle that a week belongs to the calendar year to which the majority of its calendar days belong.
]
This rule is based on the principle that a week belongs to the calendar year to which the majority of its calendar days belong.

#quote[
Note: In the HWC, days of the first and last week of a HWC year may belong to the previous and the next Hijri calendar year respectively.
]


/ calendar date: A particular calendar day represented by its calendar year, its #link("calendar-month")[calendar month] and its #link("calendar-day-of-month")[calendar day of month]. #label("calendar-date")
In the HWC, days of the first and last week of a HWC year may belong to the previous and the next Hijri calendar year respectively.
]

/ calendar date: A particular calendar day represented by its calendar year, its #link("calendar-month")[calendar month] and its #link("calendar-day-of-month")[calendar day of month].@CitekeyTechreport #label("calendar-date")

// // FIXME: the reference style doesn't seem to work
// link: [ISO 8601-1:2019, Date and time — Representations for information interchange — Part 1: Basic rules (publicly avaialble informative sections)]
Expand All @@ -48,12 +48,14 @@

/ Hijri calendar week of year: An ordinal number of a #link("hijri-calendar-week")[Hijri calendar week] within a #link("hijri-week-calendar")[HWC] year. #label("week-of-year")

\

/ Hijri calendar day of week: A day amongst the sequence of #link("hijri-week-calendar")[HWC] days, namely: Saturday, Sunday, Monday, Tuesday, Wednesday, Thursday or Friday.

#quote[
Note: Hijri weeks start on Saturday.
] #label("hijri-calendar-day-of-week")
#gnote[
Hijri weeks start on Saturday.
]

/ calendar day of month: An ordinal number of a calendar day within a calendar month.


Expand Down

0 comments on commit b96918c

Please sign in to comment.