Answer

Answer
Answered

Thanks for using the Hebcal date converter.

Unfortunately, no, we do not offer a timezone parameter or another web API to determine the Hebrew date based on the current date in a timezone.

You can do this in JavaScript using our Zmanim JavaScript API using something like the following code

const {Location, Zmanim, HDate} = require('@hebcal/core');
const location = Location.lookup('Boston');
const now = new Date();
const zmanim = new Zmanim(location, now, false);
const sunset = zmanim.sunset();
let hd = new HDate(now);
if (now >= sunset) {
  hd = hd.next();
}


hi, tnx for your answer.

where can I find your Zmanim JavaScript API documentation?

Answer
Answered

Thanks for using the Hebcal date converter.

Unfortunately, no, we do not offer a timezone parameter or another web API to determine the Hebrew date based on the current date in a timezone.

You can do this in JavaScript using our Zmanim JavaScript API using something like the following code

const {Location, Zmanim, HDate} = require('@hebcal/core');
const location = Location.lookup('Boston');
const now = new Date();
const zmanim = new Zmanim(location, now, false);
const sunset = zmanim.sunset();
let hd = new HDate(now);
if (now >= sunset) {
  hd = hd.next();
}