How to use the jdcal.MJD_0 function in jdcal

To help you get started, we’ve selected a few jdcal examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ericgazoni / openpyxl / openpyxl / date_time.py View on Github external
def from_excel(value, offset=CALENDAR_WINDOWS_1900):
    parts = list(jd2gcal(MJD_0, value + offset - MJD_0))
    fractions = value - int(value)
    diff = datetime.timedelta(days=fractions)
    if 1 > value > 0 or 0 > value > -1:
        return days_to_time(diff)
    return datetime.datetime(*parts[:3]) + diff

jdcal

Julian dates from proleptic Gregorian and Julian calendars.

BSD-2-Clause
Latest version published 6 years ago

Package Health Score

67 / 100
Full package analysis

Similar packages