From 1fd5a196fc02225773b70ec068481a016337882a Mon Sep 17 00:00:00 2001 From: "Michael J. Radwin" Date: Tue, 14 Feb 2023 14:58:49 -0800 Subject: [PATCH] Use 'hy' and 'hm' for Hebrew Year, Month for consistency with other APIs --- package.json | 2 +- src/classic-rest-api.js | 4 ++-- src/classic-rest-api.spec.js | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index c5140e0..efd4593 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@hebcal/rest-api", - "version": "4.4.0", + "version": "4.4.1", "author": "Michael J. Radwin (https://github.com/mjradwin)", "keywords": [ "hebcal" diff --git a/src/classic-rest-api.js b/src/classic-rest-api.js index 66e29d5..4b5ac5d 100644 --- a/src/classic-rest-api.js +++ b/src/classic-rest-api.js @@ -132,8 +132,8 @@ export function eventToClassicApiObject(ev, options, leyning=true) { if (mask & flags.MOLAD) { const m = ev.molad; result.molad = { - year: m.year, - month: HDate.getMonthName(m.month, m.year), + hy: m.year, + hm: HDate.getMonthName(m.month, m.year), dow: m.dow, hour: m.hour, minutes: m.minutes, diff --git a/src/classic-rest-api.spec.js b/src/classic-rest-api.spec.js index 8f60af5..819026c 100644 --- a/src/classic-rest-api.spec.js +++ b/src/classic-rest-api.spec.js @@ -574,8 +574,8 @@ test('molad', (t) => { category: 'molad', title_orig: 'Molad Adar II 5782', molad: { - year: 5782, - month: 'Adar II', + hy: 5782, + hm: 'Adar II', dow: 4, hour: 3, minutes: 51, @@ -588,8 +588,8 @@ test('molad', (t) => { category: 'molad', title_orig: 'Molad Nisan 5782', molad: { - year: 5782, - month: 'Nisan', + hy: 5782, + hm: 'Nisan', dow: 5, hour: 16, minutes: 36, @@ -602,8 +602,8 @@ test('molad', (t) => { category: 'molad', title_orig: 'Molad Iyyar 5782', molad: { - year: 5782, - month: 'Iyyar', + hy: 5782, + hm: 'Iyyar', dow: 0, hour: 5, minutes: 20,