Skip to content

doesn't refresh json moon info when requesting a separate year #7

@spacerest

Description

@spacerest

The year in .moon_datetime_info stays at 2019 even though the package gets the moon for 2020:

>>> ui.set_moon_phase("2019-01-05")
True
>>> ui.get_moon_phase_date()
datetime.datetime(2019, 1, 5, 9, 0, tzinfo=datetime.timezone.utc)
>>> print(ui.moon_datetime_info)
{'time': '05 Jan 2019 09:00 UT', 'phase': 0.46, 'age': 29.069, 'diameter': 1786.9, 'distance': 401096, 'j2000': {'ra': 18.4926, 'dec': -21.4849}, 'subsolar': {'lon': -168.825, 'lat': 0.316}, 'subearth': {'lon': 3.622, 'lat': -2.295}, 'posangle': 355.6}
>>> ui.set_moon_phase("2020-01-05")
True
>>> ui.get_moon_phase_date()
datetime.datetime(2020, 1, 5, 9, 0, tzinfo=datetime.timezone.utc)
>>> print(ui.moon_datetime_info)
{'time': '05 Jan 2019 09:00 UT', 'phase': 0.46, 'age': 29.069, 'diameter': 1786.9, 'distance': 401096, 'j2000': {'ra': 18.4926, 'dec': -21.4849}, 'subsolar': {'lon': -168.825, 'lat': 0.316}, 'subearth': {'lon': 3.622, 'lat': -2.295}, 'posangle': 355.6}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions