Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
|
bool GetPresentTime(struct tm *tm_p)
Get the current time.
struct tm * AllocateTime(void)
Allocate a struct tm variable and set all of its values to 0.
struct tm * DuplicateTime(const struct tm *src_p)
Make a deep copy of a struct tm.
void FreeTime(struct tm *time_p)
Free a struct tm variable allocated by AllocateTime().
bool SetTimeFromDDMMYYYYString(struct tm *const time_p, const char *time_s)
Set the time from a string of the form DD-MM-YYYY.
void SetDateValuesForTime(struct tm *time_p, const int year, const int month, const int day)
Set the year, month and day values for a struct tm.
struct tm * GetTimeFromString(const char *time_s)
char * GetTimeAsString(const struct tm *const time_p, const bool include_time_flag, const char *time_delimiter_p)
Get a time as a string in the ISO 8601 format.
void AddIntervalToTime(struct tm *time_p, const int days)
Add a number of days to a time.
bool ConvertDropboxStringToTime(const char *const time_s, struct tm *time_p, int *offset_p)
Convert a string that is of the form "Sat, 21 Aug 2010 22:31:20 +0000" ("%a, %d %b %Y %H:%M:%S %z") i...
void CopyTime(const struct tm *src_p, struct tm *dest_p)
Copy the values from one struct tm to another.
bool ConvertCompactStringToEpochTime(const char *const time_s, time_t *time_p)
Convert a string that is of the form YYYYMMDD or YYYYMMDDhhmmss into a time_t.
bool IsValidDate(struct tm *time_p)
void FreeTimeString(char *time_s)
Free a string previsouly-generated from GetTimeAsString().
void ClearTime(struct tm *time_p)
bool ConvertDropboxStringToEpochTime(const char *const time_s, time_t *time_p)
Convert a string that is of the form "Sat, 21 Aug 2010 22:31:20 +0000" ("%a, %d %b %Y %H:%M:%S %z") i...
bool ConvertCompactStringToTime(const char *const time_s, struct tm *time_p, int *offset_p)
Convert a string that is of the form YYYYMMDD or YYYYMMDDhhmmss into a struct tm.
bool SetTimeFromString(struct tm *const time_p, const char *time_s)
Set the time from a string in the ISO 8601 format.
void FreeTimeArray(struct tm **values_pp, const size_t num_values)
int CompareDates(const struct tm *time_0_p, const struct tm *time_1_p, const bool dates_only_flag)
Compare two dates chronologically.
#define GRASSROOTS_UTIL_API
Definition: grassroots_util_library.h:47
bool MayStringIncludeTime(const char *const time_s)