Skip to content

Commit

Permalink
Update core.ts
Browse files Browse the repository at this point in the history
Updated entry point of cal in total weeks functiom
  • Loading branch information
MohsenAlyafei authored Jan 2, 2024
1 parent e4af424 commit 293b53a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export function hwcToString(array: [number, number, number]) {
* First get 3rd day before the year end (either 26th or 27th of month 12).
* Then get the week number for that day using toHWCDate() being the last week of the HWC year.
********************************************************/
export function totalHWCWeeks(y: number, { fromCal = 'islamic-umalqura' } = {}) {
export function totalHWCWeeks(y: number, fromCal = 'islamic-umalqura') {
const d = Temporal.PlainDate.from({ year: y, month: 12, day: 30, calendar: fromCal }).subtract({ days: 3 })
return toHWCDate(y, 12, d.day)[1]
}

0 comments on commit 293b53a

Please sign in to comment.