2 docCopyright("Steve Dekorte", 2002)
3 docLicense("BSD revised")
7 #define IODATE_DEFINED 1
18 #define ISDATE(self) IoObject_hasCloneFunc_(self, (IoTagCloneFunc *)IoDate_rawClone)
19 #define IODATE(time) IoDate_newWithTime_((IoState*)IOSTATE, (time_t)time)
21 typedef IoObject IoDate
;
23 IoDate
*IoDate_proto(void *state
);
24 IoDate
*IoDate_new(void *state
);
25 IoDate
*IoDate_newWithTime_(void *state
, time_t t
);
26 IoDate
*IoDate_newWithLocalTime_(void *state
, struct tm
*t
);
27 IoDate
*IoDate_newWithTimeval_(void *state
, struct timeval tv
);
28 IoDate
*IoDate_rawClone(IoDate
*self
);
29 void IoDate_free(IoDate
*self
);
30 int IoDate_compare(IoDate
*self
, IoDate
*other
);
32 void IoDate_writeToStream_(IoDate
*self
, BStream
*stream
);
33 void IoDate_readFromStream_(IoDate
*self
, BStream
*stream
);
35 double IoDate_difference_(IoDate
*self
, IoDate
*other
);
37 // -----------------------------------------------------------
39 IoObject
*IoDate_now(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);
40 IoObject
*IoDate_clock(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);
41 IoObject
*IoDate_copy(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);
42 IoObject
*IoDate_cpuSecondsToRun(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);
43 IoObject
*IoDate_year(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);
44 IoObject
*IoDate_setYear(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);
45 IoObject
*IoDate_month(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);
46 IoObject
*IoDate_setMonth(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);
47 IoObject
*IoDate_day(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);
48 IoObject
*IoDate_setDay(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);
49 IoObject
*IoDate_hour(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);
50 IoObject
*IoDate_setHour(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);
51 IoObject
*IoDate_minute(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);
52 IoObject
*IoDate_setMinute(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);
53 IoObject
*IoDate_second(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);
54 IoObject
*IoDate_setSecond(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);
55 IoObject
*IoDate_isDaylightSavingsTime(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);
56 IoObject
*IoDate_zone(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);
57 IoObject
*IoDate_gmtOffset(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);
58 IoObject
*IoDate_gmtOffsetSeconds(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);
60 IoObject
*IoDate_isValidTime(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);
61 IoObject
*IoDate_secondsSince_(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);
62 IoObject
*IoDate_secondsSinceNow(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);
63 IoObject
*IoDate_isPast(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);
64 //IoObject *IoDate_dateAfterSeconds_(IoDate *self, IoObject *locals, IoMessage *m);
65 IoObject
*IoDate_printDate(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);
69 IoObject
*IoDate_asString(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);
70 IoObject
*IoDate_asNumber(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);
72 IoObject
*IoDate_fromNumber(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);
73 IoObject
*IoDate_fromString(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);
75 IoObject
*IoDate_setFormat(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);
76 IoObject
*IoDate_format(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);
80 IoObject
*IoDate_subtract(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);
81 IoObject
*IoDate_subtractInPlace(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);
82 IoObject
*IoDate_add(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);
83 IoObject
*IoDate_addInPlace(IoDate
*self
, IoObject
*locals
, IoMessage
*m
);