|
libGimbal 0.1.0
C17-Based Extended Standard Library and Cross-Language Runtime Framework
|
Go to the source code of this file.
Data Structures | |
| struct | GblDateTimeClass |
| struct | GblDate |
| struct | GblTime |
| struct | GblDateTime |
Macros | |
| #define | GBL_DATE_TIME_TYPE |
| #define | GBL_DATE_TIME_CLASS(klass) |
| #define | GBL_DATE_TIME_ISO8601_STRING_SIZE |
Second Conversions | |
Defines for second conversion factors | |
| #define | GBL_TIME_MSECS_PER_SEC |
| #define | GBL_TIME_USECS_PER_SEC |
| #define | GBL_TIME_NSECS_PER_SEC |
Start Dates | |
Initial dates of epochs | |
| #define | GBL_DATE_GREGORIAN_YEAR_FIRST |
| #define | GBL_DATE_UNIX_EPOCH_YEAR |
| #define | GBL_DATE_UNIX_EPOCH_MONTH |
| #define | GBL_DATE_UNIX_EPOCH_DAY |
Broken-down Time | |
Defines for working with broken-down time | |
| #define | GBL_DATE_TIME_BROKEN_DOWN_YEAR_FIRST |
| #define | GBL_DATE_TIME_BROKEN_DOWN_YEAR_MIN |
| #define | GBL_DATE_TIME_BROKEN_DOWN_MONTH_OFFSET |
Formatting | |
Defines used when formatting and stringifying | |
| #define | GBL_DATE_TIME_FORMAT_BUFFER_SIZE_INCREMENT |
| #define | GBL_DATE_TIME_FORMAT_BUFFER_SIZE_MULTIPLIER_MAX |
Typedefs | |
| typedef GblEnum | GblMonth |
| typedef GblEnum | GblWeekDay |
| typedef int32_t | GblYear |
| typedef int32_t | GblDay |
| typedef int32_t | GblNanoSecond |
| typedef int64_t | GblSecond |
| typedef int32_t | GblMinute |
| typedef int32_t | GblHour |
| typedef struct timespec | GblTimeSpec |
Enumerations | |
| enum | GblMonth |
| enum | GblWeekDay |
Functions | |
Type System | |
Type declarations for GblVariant time type | |
| GblType | GblDateTime_type (void) |
Date Static Methods | |
Non-member functions for date management | |
| GblBool | GblDate_isLeapYear (GblYear year) |
| GblDay | GblDate_monthDays (GblMonth month, GblYear year) |
| const char * | GblDate_monthStr (GblMonth month) |
| const char * | GblDate_monthStrShort (GblMonth month) |
| const char * | GblDate_weekDayStr (GblWeekDay weekDay) |
| const char * | GblDate_weekDayStrShort (GblWeekDay weekDay) |
Time Static Methods | |
Non-member functions for time management | |
| const char * | GblTime_amPmStr (GblBool isPm) |
| GblSecond | GblTime_localUtcOffset (void) |
| GblTimeSpec | GblTime_specDiff (const GblTimeSpec *pSrc1, const GblTimeSpec *pSrc2) |
Date and time conversions and utilities.
Definition in file gimbal_date_time.h.
| #define GBL_DATE_TIME_TYPE |
Definition at line 22 of file gimbal_date_time.h.
| #define GBL_DATE_TIME_CLASS | ( | klass | ) |
Definition at line 23 of file gimbal_date_time.h.
| #define GBL_TIME_MSECS_PER_SEC |
Number of milliseconds per second.
Definition at line 29 of file gimbal_date_time.h.
| #define GBL_TIME_USECS_PER_SEC |
Number of microseconds per second.
Definition at line 30 of file gimbal_date_time.h.
| #define GBL_TIME_NSECS_PER_SEC |
Number of nanoseconds per second.
Definition at line 31 of file gimbal_date_time.h.
| #define GBL_DATE_GREGORIAN_YEAR_FIRST |
First year in Gregorian calendar.
Definition at line 38 of file gimbal_date_time.h.
| #define GBL_DATE_UNIX_EPOCH_YEAR |
Year of the Unix epoch.
Definition at line 39 of file gimbal_date_time.h.
| #define GBL_DATE_UNIX_EPOCH_MONTH |
Month of the Unix epoch.
Definition at line 40 of file gimbal_date_time.h.
| #define GBL_DATE_UNIX_EPOCH_DAY |
Day of the unix epoch.
Definition at line 41 of file gimbal_date_time.h.
| #define GBL_DATE_TIME_BROKEN_DOWN_YEAR_FIRST |
Year offset of a broken-down time's date.
Definition at line 48 of file gimbal_date_time.h.
| #define GBL_DATE_TIME_BROKEN_DOWN_YEAR_MIN |
The oldest year a broken-down time can handle by spec.
Definition at line 49 of file gimbal_date_time.h.
| #define GBL_DATE_TIME_BROKEN_DOWN_MONTH_OFFSET |
Month offset from GblMonth to a broken-down month.
Definition at line 50 of file gimbal_date_time.h.
| #define GBL_DATE_TIME_FORMAT_BUFFER_SIZE_INCREMENT |
Size increment when resizing format buffers.
Definition at line 57 of file gimbal_date_time.h.
| #define GBL_DATE_TIME_FORMAT_BUFFER_SIZE_MULTIPLIER_MAX |
Maximum number of size increments for format buffers.
Definition at line 58 of file gimbal_date_time.h.
| #define GBL_DATE_TIME_ISO8601_STRING_SIZE |
Required buffer size for going to an ISO8601-formatted string.
Definition at line 61 of file gimbal_date_time.h.
Represents a month of the 12-month year.
Definition at line 66 of file gimbal_date_time.h.
| typedef GblEnum GblWeekDay |
Represents a day of the 7-day week.
Definition at line 83 of file gimbal_date_time.h.
| typedef int32_t GblYear |
Represents a calendar year.
Definition at line 94 of file gimbal_date_time.h.
| typedef int32_t GblDay |
Represents a 24-hour day within a month (0-31)
Definition at line 95 of file gimbal_date_time.h.
| typedef int32_t GblNanoSecond |
Represents a nanosecond within a second (0-1000000000.
Definition at line 96 of file gimbal_date_time.h.
| typedef int64_t GblSecond |
Represents a second in a 60-second minute (0-59)
Definition at line 97 of file gimbal_date_time.h.
| typedef int32_t GblMinute |
Represents a minute in a 60-minute hour (0-59)
Definition at line 98 of file gimbal_date_time.h.
| typedef int32_t GblHour |
Represents an hour within a 24-hour day (0-23)
Definition at line 99 of file gimbal_date_time.h.
| typedef struct timespec GblTimeSpec |
Represents the difference between two GblTime instances.
Definition at line 102 of file gimbal_date_time.h.
| enum GblMonth |
Definition at line 66 of file gimbal_date_time.h.
| enum GblWeekDay |
Definition at line 83 of file gimbal_date_time.h.
Returns GBL_TRUE if the given year was a leap year, otherwise returns GBL_FALSE.
Returns the number of days in the given month of the given year.
| const char * GblDate_monthStr | ( | GblMonth | month | ) |
Returns the string name of the given month.
| const char * GblDate_monthStrShort | ( | GblMonth | month | ) |
Returns the short-handed string name of the given month.
| const char * GblDate_weekDayStr | ( | GblWeekDay | weekDay | ) |
Returns the string name of the given weekday.
| const char * GblDate_weekDayStrShort | ( | GblWeekDay | weekDay | ) |
Returns the short-handed string name of the given weekday.
| const char * GblTime_amPmStr | ( | GblBool | isPm | ) |
Returns the string "PM" if isPm is GBL_TRUE, otherwise returns "AM".
| GblSecond GblTime_localUtcOffset | ( | void | ) |
Returns the number of seconds the local time is offset from UTC time.
| GblTimeSpec GblTime_specDiff | ( | const GblTimeSpec * | pSrc1, |
| const GblTimeSpec * | pSrc2 ) |
Returns the difference between two NS-resolution GblTimeSpec values.