def test_hdate_to_hdate_meuberet_adar(self, year): for day in range(1, 30 + 1): date = HebrewDate(year, 13, day) assert conv.jdn_to_hdate(conv.hdate_to_jdn(date)) == date for day in range(1, 29 + 1): date = HebrewDate(year, 14, day) assert conv.jdn_to_hdate(conv.hdate_to_jdn(date)) == date
def test_hdate_to_hdate_meuberet_adar(self, year): for day in range(1, 30 + 1): date = HebrewDate(year, Months.Adar_I, day) assert conv.jdn_to_hdate(conv.hdate_to_jdn(date)) == date for day in range(1, 29 + 1): date = HebrewDate(year, Months.Adar_II, day) assert conv.jdn_to_hdate(conv.hdate_to_jdn(date)) == date
def hdate(self): """Return the hebrew date.""" if self._last_updated == "hdate": return self._hdate return conv.jdn_to_hdate(self._jdn)
def test_hdate_to_hdate_meuberet_kislev(self, year): days_in_month = 30 if not year == 5749 else 29 for day in range(1, days_in_month + 1): date = HebrewDate(year, Months.Kislev, day) assert conv.jdn_to_hdate(conv.hdate_to_jdn(date)) == date
def test_hdate_to_hdate_meuberet_heshvan(self, year): days_in_month = 29 if not year == 5760 else 30 for day in range(1, days_in_month + 1): date = HebrewDate(year, Months.Marcheshvan, day) assert conv.jdn_to_hdate(conv.hdate_to_jdn(date)) == date
def test_hdate_to_hdate_meuberet_simple(self, year): for days_in_month, months in self.SIMPLE_MONTHS.items(): for month in months: for day in range(1, days_in_month + 1): date = HebrewDate(year, month, day) assert conv.jdn_to_hdate(conv.hdate_to_jdn(date)) == date
def test_hdate_to_hdate_pshuta_adar(self, year): for day in range(1, 29 + 1): date = HebrewDate(year, Months.Adar, day) assert conv.jdn_to_hdate(conv.hdate_to_jdn(date)) == date
def test_hdate_to_hdate_pshuta_kislev(self, year): days_in_month = 30 if not year == 5753 else 29 for day in range(1, days_in_month + 1): date = HebrewDate(year, 3, day) assert conv.jdn_to_hdate(conv.hdate_to_jdn(date)) == date
def test_hdate_to_hdate_pshuta_heshvan(self, year): days_in_month = 29 if not year == 5756 else 30 for day in range(1, days_in_month + 1): date = HebrewDate(year, 2, day) assert conv.jdn_to_hdate(conv.hdate_to_jdn(date)) == date
def test_hdate_to_hdate_meuberet_kislev(self, year): days_in_month = 30 if not year == 5749 else 29 for day in range(1, days_in_month + 1): date = HebrewDate(year, 3, day) assert conv.jdn_to_hdate(conv.hdate_to_jdn(date)) == date
def test_hdate_to_hdate_meuberet_heshvan(self, year): days_in_month = 29 if not year == 5760 else 30 for day in range(1, days_in_month + 1): date = HebrewDate(year, 2, day) assert conv.jdn_to_hdate(conv.hdate_to_jdn(date)) == date
def test_hdate_to_hdate_pshuta_adar(self, year): for day in range(1, 29 + 1): date = HebrewDate(year, 6, day) assert conv.jdn_to_hdate(conv.hdate_to_jdn(date)) == date