SunPy time

sunpy.time Module

Time related functionality


break_time([t]) Given a time returns a string.
day_of_year(time_string) Returns the (fractional) day of year.
extract_time(string) Find subset of string that corresponds to a datetime and return its value as a a datetime.
find_time(string, format) Return iterator of occurences of date formatted with format in string.
get_day(dt) Return datetime for the beginning of the day of given datetime.
is_time(time_string) Returns true if the input is a valid date/time representation :Parameters: time_string : string Datestring to parse :Returns: out : bool True if can be parsed by parse_time ..
is_time_in_given_format(time_string, time_format) Tests whether a time string is formatted according to the given time format.
julian_centuries([t]) Returns the number of Julian centuries since 1900 January 0.5.
julian_day([t]) Returns the (fractional) Julian day defined as the number of days between the queried day and the reference date of 12:00 (noon) Jan 1, 4713 BC.
parse_time(time_string) Given a time string will parse and return a datetime object.


TimeRange(a, b) or Timerange((a, b)) An object to handle time ranges.

Class Inheritance Diagram

Inheritance diagram of sunpy.time.timerange.TimeRange