2 docCopyright("Steve Dekorte", 2002)
3 docLicense("BSD revised")
13 #include "PortableGettimeofday.h"
26 BASEKIT_API Date
*Date_new(void);
27 BASEKIT_API
void Date_copy_(Date
*self
, const Date
*other
);
28 BASEKIT_API
void Date_free(Date
*self
);
29 BASEKIT_API
int Date_compare(const Date
*self
, const Date
*other
);
31 BASEKIT_API
void Date_now(Date
*self
);
32 BASEKIT_API
void Date_setToLocalTimeZone(Date
*self
);
33 BASEKIT_API
double Date_Clock(void);
35 BASEKIT_API
void Date_fromLocalTime_(Date
*self
, struct tm
*t
);
36 BASEKIT_API
void Date_fromTime_(Date
*self
, time_t t
);
37 BASEKIT_API
time_t Date_asTime(const Date
*self
);
41 BASEKIT_API
void Date_setToLocalTimeZone(Date
*self
);
42 struct timezone
Date_timeZone(const Date
*self
);
43 BASEKIT_API
void Date_setTimeZone_(Date
*self
, struct timezone tz
);
44 BASEKIT_API
void Date_convertToTimeZone_(Date
*self
, struct timezone tz
);
48 BASEKIT_API
void Date_setYear_(Date
*self
, long y
);
49 BASEKIT_API
long Date_year(const Date
*self
);
51 BASEKIT_API
void Date_setMonth_(Date
*self
, int m
);
52 BASEKIT_API
int Date_month(const Date
*self
);
54 BASEKIT_API
void Date_setDay_(Date
*self
, int d
);
55 BASEKIT_API
int Date_day(const Date
*self
);
57 BASEKIT_API
void Date_setHour_(Date
*self
, int h
);
58 BASEKIT_API
int Date_hour(const Date
*self
);
60 BASEKIT_API
void Date_setMinute_(Date
*self
, int m
);
61 BASEKIT_API
int Date_minute(const Date
*self
);
63 BASEKIT_API
void Date_setSecond_(Date
*self
, double s
);
64 BASEKIT_API
double Date_second(const Date
*self
);
66 BASEKIT_API
unsigned char Date_isDaylightSavingsTime(const Date
*self
);
67 BASEKIT_API
int Date_isLeapYear(const Date
*self
);
71 BASEKIT_API
double Date_asSeconds(const Date
*self
);
72 BASEKIT_API
void Date_fromSeconds_(Date
*self
, double s
);
74 BASEKIT_API
void Date_addSeconds_(Date
*self
, double s
);
75 BASEKIT_API
double Date_secondsSince_(const Date
*self
, const Date
*other
);
79 BASEKIT_API
void Date_fromString_format_(Date
*self
, const char *s
, const char *format
);
83 BASEKIT_API Duration
*Date_newDurationBySubtractingDate_(const Date
*self
, const Date
*other
);
84 BASEKIT_API
void Date_addDuration_(Date
*self
, const Duration
*d
);
85 BASEKIT_API
void Date_subtractDuration_(Date
*self
, const Duration
*d
);
87 BASEKIT_API
double Date_secondsSinceNow(const Date
*self
);
89 BASEKIT_API UArray
*Date_asString(const Date
*self
, const char *format
);