SunPy time

The time submodule contains helpers for converting strings to Python datetime.datetime objects and handling common operations on these objects. As well as this a TimeRange object is provided for representing a period of time and performing operations on that range.

sunpy.time Package

Time related functionality

Functions

break_time([t, time_format]) Given a time returns a string.
day_of_year(time_string) Returns the (fractional) day of year.
find_time(string, format) Return iterator of occurrences 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[, time_format]) Returns true if the input is a valid date/time representation
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 J1900.0 (noon on 1900 January 0).
julian_day([t]) Wrap a UTC -> JD conversion from astropy.
parse_time(time_string[, time_format]) Given a time string will parse and return a datetime object.

Classes

TimeRange(a[, b]) An object to handle time ranges.

Class Inheritance Diagram

Inheritance diagram of sunpy.time.timerange.TimeRange