aboutsummaryrefslogtreecommitdiff
path: root/src/include/utils/datetime.h
blob: 584f96074c05c4b10a51e54a95204ae38337bc68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*-------------------------------------------------------------------------
 *
 * datetime.h--
 *    Definitions for the datetime
 *
 *
 * Copyright (c) 1994, Regents of the University of California
 *
 * $Id: datetime.h,v 1.2 1997/03/14 23:33:21 scrappy Exp $
 *
 *-------------------------------------------------------------------------
 */
#ifndef DATETIME_H
#define DATETIME_H

#include "utils/dt.h"

#if USE_NEW_DATE

typedef int32	DateADT;

#else

/* these things look like structs, but we pass them by value so be careful
   For example, passing an int -> DateADT is not portable! */
typedef struct DateADT {
    char	day;
    char	month;
    short	year;
} DateADT;

#endif

#if USE_NEW_TIME

typedef float8	TimeADT;

#else

typedef struct TimeADT {
    short	hr;
    short	min;
    float	sec;
} TimeADT;

#endif

#endif /* DATETIME_H */