Пример #1
0
 def new_year_on_or_before(cls, fixed_date):
     """Return fixed date of Future Bahai New Year on or
     before fixed date, 'fixed_date'."""
     approx = Solar.estimate_prior_solar_longitude(Astro.SPRING, cls.sunset_in_haifa(fixed_date))
     return next_int(ifloor(approx) - 1, lambda day: Solar.solar_longitude(cls.sunset_in_haifa(day)) <= Astro.SPRING + 2)
Пример #2
0
 def winter_solstice_on_or_before(cls, fixed_date):
     """Return fixed date, in the Chinese zone, of winter solstice
     on or before fixed date, 'fixed_date'."""
     approx = Solar.estimate_prior_solar_longitude(Astro.WINTER, cls.midnight(fixed_date + 1))
     return next_int(ifloor(approx) - 1, lambda day: Astro.WINTER < Solar.solar_longitude(cls.midnight(1 + day)))
Пример #3
0
 def new_year_on_or_before(cls, date):
     """Return the fixed date of Astronomical Persian New Year on or
     before fixed date, date."""
     approx = Solar.estimate_prior_solar_longitude(Astro.SPRING, cls.midday_in_tehran(date))
     return next_int(ifloor(approx) - 1, lambda day: (Solar.solar_longitude(cls.midday_in_tehran(day)) <= (Astro.SPRING + 2)))
Пример #4
0
 def new_year_on_or_before(cls, date):
     """Return fixed date of French Revolutionary New Year on or
        before fixed date, date."""
     approx = Solar.estimate_prior_solar_longitude(Astro.AUTUMN, cls.midnight_in_paris(date))
     return next_int(ifloor(approx) - 1, lambda day: Astro.AUTUMN <= Solar.solar_longitude(cls.midnight_in_paris(day)))