Date
- class kanon.calendars.Date(calendar: kanon.calendars.calendars.Calendar, ymd: Tuple[int, int, int], hours: Union[float, numbers.Real] = 12 ; )[source] [edit on github]
Bases:
object
Dataclass defining a date.
>>> cal = Calendar.registry["Julian A.D."] >>> date = Date(cal, (1,2,3), 13) >>> str(date) '3 Februarius 1 A.D. in Julian 13:00' >>> date.jdn 1721457.0416666667 >>> str(date + 1) '4 Februarius 1 A.D. in Julian 13:00'
- Parameters
Attributes Summary
Calendar used in this date.
Number of hours
Date as a julian day number.
Year, month and days, expressed in the specified calendar.
Methods Summary
Get number of days from the start of the calendar
to_calendar
(cal)Express this date in another calendar.
to_time
()Express this date as a
astropy.time.Time
object withjd
format.Attributes Documentation
- hours
Number of hours
- Return type
Sexagesimal
Methods Documentation
- days_from_epoch() float [source] [edit on github]
Get number of days from the start of the calendar
- to_calendar(cal: kanon.calendars.calendars.Calendar) kanon.calendars.calendars.Date [source] [edit on github]
Express this date in another calendar.
-
to_time()
astropy.time.Time
[source] [edit on github] Express this date as a
astropy.time.Time
object withjd
format.