The Chinese Solar Terms 节气 are defined by the Earth angle to the Sun, beginning with Spring Equinox defined as 0°, Summer Solstice as 90° etc. The days for some of these terms can be easily computed using the pyephem provided functions.
But there are a number of intermediate terms (such as Qingmingjie with 15°) for which there are no pyephem provided functions.
I can see that internally pyephem uses a method called holiday to compute solstice and equinox, but the input is unclear to me.
def holiday(d0, motion, offset):
"""Function that assists the finding of equinoxes and solstices."""
What would be the correct input parameters to this function to calculate the next Qingmingjie (solar angle 15°)?
now = ephem.date(datetime.datetime.now())
print ephem.holiday(now, ephem.twopi, ??)
The correct answer for 2017 is 2017-04-04.