43typedef struct das_time_t{
109#define DAS_TIME_NULL {0, 0, 0, 0, 0, 0, 0.0}
149 das_time* pDt,
unsigned short int daysSince1958,
unsigned int msOfDay
190 das_time* pDt,
int year,
int month,
int mday,
int yday,
int hour,
191 int minute,
double second
326#ifndef ILLEGAL_TT2000_VALUE
327#define ILLEGAL_TT2000_VALUE (-9223372036854775805LL)
373 int year,
int month,
int mday,
int hour,
int minute,
int second,
374 int32_t nanosec, int64_t* pTT
388 int64_t nTT,
int* pYear,
int* pMonth,
int* pMday,
int* pHour,
389 int* pMinute,
int* pSecond, int32_t* pNanosec
410int jday (
int year,
int month,
int day);
Minimal definitions for das2 utilities that can safely be run without calling das_init().
int DasErrCode
return code type 0 indicates success, negative integer indicates failure
Definition defs.h:189
Basic date-time structure used throughout the Das1 & Das2 utilities.
Definition time.h:43
double second
Second of the minute.
Definition time.h:69
DAS_API double dt_ttime(const das_time *dt)
Convert time components to double seconds since January 1st 1958.
#define dt_parsetime(S, T)
Convert most human-parseable time strings to numeric components.
#define dt_isoc(B, N, T, F)
Print an ISOC standard time string given a das_time structure.
DAS_API double dt_diff(const das_time *pA, const das_time *pB)
Get the difference of two das_time structures in seconds.
int hour
Hour of day, range is 0 to 23.
Definition time.h:60
#define dt_dual_str(B, N, T, F)
Print time a string that provides both day of month and day of year given a das_time structure.
DAS_API int64_t dt_nano_1970(const das_time *dt)
Convert a das time to integer nanoseconds since 1970-01-01.
DAS_API bool dt_now(das_time *pDt)
Initialize a das_time to the current UTC time.
DAS_API void dt_tnorm(das_time *dt)
Normalize date and time components.
DAS_API bool dt_in_range(const das_time *begin, const das_time *end, const das_time *test)
Test for time within a time range The the standard exclusive upper bound test.
DAS_API int dt_compare(const das_time *pA, const das_time *pB)
Compare to dastime structures.
DAS_API void dt_copy(das_time *pDest, const das_time *pSrc)
Simple helper to copy values from one das time to another.
DAS_API void dt_from_tt2k(das_time *dt, int64_t nTime)
Convert a TT2000 time to a time structure.
int minute
Minute of the hour, range 0 to 59.
Definition time.h:63
#define dt_isod(B, N, T, F)
Print an ISOD standard time string given a das_time structure.
int mday
Calendar Day of month, starts at 1.
Definition time.h:52
int yday
Integer Day of year, Jan.
Definition time.h:57
#define dt_from_1958(D, MS, T)
Get a das time given days since 1958 and optional milliseconds of day.
int year
Calendar year number, cannot hold years before 1 AD.
Definition time.h:46
#define dt_emitt(TT, T)
convert double seconds since epoch to time components.
DAS_API void dt_set(das_time *pDt, int year, int month, int mday, int yday, int hour, int minute, double second)
Simple helper to set values in a das time.
int month
Calendar month number, 1 = January.
Definition time.h:49
DAS_API int64_t dt_to_tt2k(const das_time *dt)
Convert a time structure to a TT2000 time.
DAS_API void dt_null(das_time *pDt)
Zero out all values in a das_time structure.
DAS_API DasErrCode tt2k_from_parts(int year, int month, int mday, int hour, int minute, int second, int32_t nanosec, int64_t *pTT)
Convert broken out UTC fields to TT2000, without floating point seconds.
DAS_API void tt2k_to_parts(int64_t nTT, int *pYear, int *pMonth, int *pMday, int *pHour, int *pMinute, int *pSecond, int32_t *pNanosec)
Break a TT2000 time into UTC fields, without floating point seconds.