Add PlanetaryTime.time and .date convenience properties
This commit is contained in:
@@ -139,6 +139,16 @@ class PlanetaryTime:
|
||||
"""Second within the current minute (0-indexed)."""
|
||||
return self._second
|
||||
|
||||
@property
|
||||
def time(self) -> str:
|
||||
"""Current time of sol as 'HH:MM:SS'."""
|
||||
return f"{self._hour:02d}:{self._minute:02d}:{self._second:02d}"
|
||||
|
||||
@property
|
||||
def date(self) -> str:
|
||||
"""Current date as 'Year X, Sol Y'."""
|
||||
return f"Year {self._year}, Sol {self._sol}"
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# String representation
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user