| 1 | /* datetime.h
|
|---|
| 2 | */
|
|---|
| 3 |
|
|---|
| 4 | #ifndef DATETIME_H
|
|---|
| 5 | #define DATETIME_H
|
|---|
| 6 | #ifdef __cplusplus
|
|---|
| 7 | extern "C" {
|
|---|
| 8 | #endif
|
|---|
| 9 |
|
|---|
| 10 | /* Fields are packed into successive bytes, each viewed as unsigned and
|
|---|
| 11 | * big-endian, unless otherwise noted:
|
|---|
| 12 | *
|
|---|
| 13 | * byte offset
|
|---|
| 14 | * 0 year 2 bytes, 1-9999
|
|---|
| 15 | * 2 month 1 byte, 1-12
|
|---|
| 16 | * 3 day 1 byte, 1-31
|
|---|
| 17 | * 4 hour 1 byte, 0-23
|
|---|
| 18 | * 5 minute 1 byte, 0-59
|
|---|
| 19 | * 6 second 1 byte, 0-59
|
|---|
| 20 | * 7 usecond 3 bytes, 0-999999
|
|---|
| 21 | * 10
|
|---|
| 22 | */
|
|---|
| 23 |
|
|---|
| 24 | /* # of bytes for year, month, and day. */
|
|---|
| 25 | #define _PyDateTime_DATE_DATASIZE 4
|
|---|
| 26 |
|
|---|
| 27 | /* # of bytes for hour, minute, second, and usecond. */
|
|---|
| 28 | #define _PyDateTime_TIME_DATASIZE 6
|
|---|
| 29 |
|
|---|
| 30 | /* # of bytes for year, month, day, hour, minute, second, and usecond. */
|
|---|
| 31 | #define _PyDateTime_DATETIME_DATASIZE 10
|
|---|
| 32 |
|
|---|
| 33 |
|
|---|
| 34 | typedef struct
|
|---|
|
|---|