SDDSlib
|
Provides functions for converting and manipulating time representations, including leap year calculations, Julian day conversions, and epoch time breakdowns. More...
#include "mdb.h"
#include <time.h>
Go to the source code of this file.
Functions | |
short | IsLeapYear (short year) |
short | JulianDayFromMonthDay (short month, short day, short year, short *julianDay) |
short | MonthDayFromJulianDay (short julianDay, short year, short *month, short *day) |
short | TimeEpochToBreakdown (short *year, short *jDay, short *month, short *day, double *hour, double epochTime) |
Breaks down epoch time into its constituent components. | |
short | TimeEpochToText (char *text, double epochTime) |
Converts epoch time to a formatted text string. | |
short | TimeBreakdownToEpoch (short year, short jDay, short month, short day, double hour, double *epochTime) |
Converts a broken-down time into epoch time. | |
Variables | |
static short | DaysInMonths [2][12] |
Provides functions for converting and manipulating time representations, including leap year calculations, Julian day conversions, and epoch time breakdowns.
Definition in file timeconvert.c.
short IsLeapYear | ( | short | year | ) |
Definition at line 19 of file timeconvert.c.
short JulianDayFromMonthDay | ( | short | month, |
short | day, | ||
short | year, | ||
short * | julianDay ) |
Definition at line 60 of file timeconvert.c.
short MonthDayFromJulianDay | ( | short | julianDay, |
short | year, | ||
short * | month, | ||
short * | day ) |
Definition at line 78 of file timeconvert.c.
short TimeBreakdownToEpoch | ( | short | year, |
short | jDay, | ||
short | month, | ||
short | day, | ||
double | hour, | ||
double * | epochTime ) |
Converts a broken-down time into epoch time.
This function takes individual time components and converts them into epoch time. It handles both Julian day and standard month/day formats based on the input.
year | The year. |
jDay | The Julian day number. |
month | The month. |
day | The day of the month. |
hour | The fractional hour. |
epochTime | Pointer to store the resulting epoch time. |
Definition at line 184 of file timeconvert.c.
short TimeEpochToBreakdown | ( | short * | year, |
short * | jDay, | ||
short * | month, | ||
short * | day, | ||
double * | hour, | ||
double | epochTime ) |
Breaks down epoch time into its constituent components.
This function decomposes epoch time into year, Julian day, month, day, and fractional hour components.
year | Pointer to store the year. |
jDay | Pointer to store the Julian day. |
month | Pointer to store the month. |
day | Pointer to store the day. |
hour | Pointer to store the fractional hour. |
epochTime | The epoch time to be broken down. |
Definition at line 117 of file timeconvert.c.
short TimeEpochToText | ( | char * | text, |
double | epochTime ) |
Converts epoch time to a formatted text string.
This function formats epoch time into a human-readable string in the format "YYYY/MM/DD HH:MM:SS.FFFF".
text | Buffer to store the formatted time string. |
epochTime | The epoch time to be converted. |
Definition at line 157 of file timeconvert.c.
|
static |
Definition at line 29 of file timeconvert.c.