Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdint.h>
- /*
- * A base date structure that can easily represent any date necessary (in the Gregorian calendar).
- */
- typedef struct sCDate {
- uint16_t year;
- unsigned year_sign : 1;
- unsigned month : 4;
- unsigned mday : 5;
- unsigned hour : 5;
- unsigned min : 6;
- unsigned sec : 6;
- signed offset : 5;
- unsigned _padding : 16; // to align unexpanded date to int boundary
- } CDate;
- typedef struct sXCDate {
- uint32_t year;
- unsigned year_sign : 1;
- unsigned month : 4;
- unsigned mday : 5;
- unsigned hour : 5;
- unsigned min : 6;
- unsigned sec : 6;
- signed offset : 5;
- } XCDate;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement