Skip to content

Commit

Permalink
Fix Molad for @hebcal/core 5.4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
mjradwin committed Jun 4, 2024
1 parent 757d15a commit 2fd345c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"url": "https://github.com/hebcal/hebcal-rest-api/issues"
},
"dependencies": {
"@hebcal/core": "^5.3.13",
"@hebcal/core": "^5.4.4",
"@hebcal/leyning": "^8.1.9",
"@hebcal/triennial": "^5.0.5"
},
Expand Down
13 changes: 7 additions & 6 deletions src/classic-rest-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,14 @@ export function eventToClassicApiObject(ev, options, leyning=true) {
}
if (mask & flags.MOLAD) {
const m = ev.molad;
const hy = m.getYear();
result.molad = {
hy: m.year,
hm: HDate.getMonthName(m.month, m.year),
dow: m.dow,
hour: m.hour,
minutes: m.minutes,
chalakim: m.chalakim,
hy,
hm: HDate.getMonthName(m.getMonth(), hy),
dow: m.getDow(),
hour: m.getHour(),
minutes: m.getMinutes(),
chalakim: m.getChalakim(),
};
delete result.hebrew;
}
Expand Down

0 comments on commit 2fd345c

Please sign in to comment.