from datetime import datetime


def run_example():
    moment_in_time = datetime.fromordinal(256)
    print(moment_in_time)
    print(moment_in_time.toordinal())
    print(moment_in_time.weekday())
    print(moment_in_time.isoweekday())

    other_moment = datetime.fromtimestamp(16_000_000)
    print(other_moment)
    print(other_moment.timestamp())
    print(other_moment.isocalendar())


if __name__ == "__main__":
    run_example()

[((5, 21, 5, 46), 'datetime.datetime.fromordinal', 'datetime.fromordinal', ({(5, 42, 5, 45): '256'}, {}), '(256)', False, 'from datetime import datetime\n'), ((11, 19, 11, 53), 'datetime.datetime.fromtimestamp', 'datetime.fromtimestamp', ({(11, 42, 11, 52): '16000000'}, {}), '(16000000)', False, 'from datetime import datetime\n')]