
Time Utils

This utility can be used to validate a time/date/datetime.
File Structure

utils/
└── time/
├── validate.c
└── validate.h
core_types/
├── format/
| └── time.h
└── return/
└── status.h
The library is completely patform independent and can be usesd across a wide range of c-compilers.
Downloads
The library can be downloaded (zip or tar), cloned or used as submodule in a project.
| Type | File | Description |
| Library | zip / tar | Time utility library that implements time/date/datetime validation |
Using with git clone
mkdir -p ./core_types/
git clone https://github.com/0x007E/core_types-format.git ./core_types
mv ./core_types/core_types-format ./core_types/format
git clone https://github.com/0x007E/core_types-return.git ./core_types
mv ./core_types/core_types-return ./core_types/return
mkdir -p ./utils/
git clone https://github.com/0x007E/utils-time.git ./utils
mv ./utils/utils-time ./utils/time
Using as git submodule
git submodule add https://github.com/0x007E/core_types-format.git ./core_types/format
git submodule add https://github.com/0x007E/core_types-return.git ./core_types/return
git submodule add https://github.com/0x007E/utils-time.git ./utils/time
Programming
#include "../lib/utils/time/validate.h"
int main(void)
{
{
}
{
}
{
}
}
@ RETURN_Valid
Definition status.h:52
struct FORMAT_DateTime_t FORMAT_DateTime
Alias for struct FORMAT_DateTime_t representing a combined date-time value.
Definition time.h:92
struct FORMAT_Time_t FORMAT_Time
Alias for struct FORMAT_Time_t representing a formatted time of day.
Definition time.h:45
struct FORMAT_Date_t FORMAT_Date
Alias for struct FORMAT_Date_t representing a formatted calendar date.
Definition time.h:69
RETURN_Data_Status validate_time(const FORMAT_Time *time)
Validates a FORMAT_Time instance for proper hour, minute, and second ranges.
Definition validate.c:37
RETURN_Data_Status validate_datetime(const FORMAT_DateTime *datetime)
Validates a FORMAT_DateTime instance by checking its date and time components.
Definition validate.c:82
RETURN_Data_Status validate_date(const FORMAT_Date *date)
Validates a FORMAT_Date instance for basic day, month, and year ranges.
Definition validate.c:61
R. GAECHTER