gcpy.date_time

Internal utilities for managing datetime objects and strings

Module Contents

Functions

get_timestamp_string(date_array)

Convenience function returning the datetime timestamp based on the given input

add_months(start_date, n_months)

Args:

is_full_year(start_date, end_date)

Verifies if two dates are a full year starting Jan 1.

gcpy.date_time.get_timestamp_string(date_array)

Convenience function returning the datetime timestamp based on the given input

Args:
date_array: array

Array of integers corresponding to [year, month, day, hour, minute, second]. Any integers not provided will be padded accordingly

Returns:
date_str: string

string in datetime format (eg. 2019-01-01T00:00:00Z)

gcpy.date_time.add_months(start_date, n_months)
Args:
start_date: numpy.datetime64

numpy datetime64 object

n_months: integer

Returns:
new_date: numpy.datetime64

numpy datetime64 object with exactly n_months added to the date

gcpy.date_time.is_full_year(start_date, end_date)

Verifies if two dates are a full year starting Jan 1.

Args:
start_date: numpy.datetime64

numpy datetime64 object

end_date: numpy.datetime64

numpy datetime64 object

Returns: boolean