SunPy time

The time submodule contains helpers for converting strings to astropy.time.Time 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

Functions

find_time(string, format)

Return iterator of occurrences of date formatted with format in string.

is_time(time_string[, time_format])

Returns true if the input is a valid date/time representation.

is_time_equal(t1, t2)

Work around for https://github.com/astropy/astropy/issues/6970.

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).

parse_time(time_string, *[, format])

Takes a time input and will parse and return a astropy.time.Time.

Classes

TimeRange(a[, b, format])

A class to create and handle time ranges.

TimeUTime(val1, val2, scale, precision, …)

Seconds from 1979-01-01 00:00:00 UTC.

Class Inheritance Diagram

Inheritance diagram of sunpy.time.timerange.TimeRange, sunpy.time.utime.TimeUTime