[go: up one dir, main page]

File: Date.3cc

package info (click to toggle)
libcommoncpp2 1.0.13-5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,740 kB
  • ctags: 2,860
  • sloc: cpp: 18,857; sh: 8,451; ansic: 1,546; makefile: 299; xml: 5
file content (238 lines) | stat: -rw-r--r-- 5,030 bytes parent folder | download
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
.TH "Date" 3 "19 Jul 2003" "CommonC++" \" -*- nroff -*-
.ad l
.nh
.SH NAME
Date \- The Date class uses a julian date representation of the current year, month, and day. julian number based date class. 
.SH SYNOPSIS
.br
.PP
\fC#include <numbers.h>\fP
.PP
Inherited by \fBDateNumber\fP, and \fBDatetime\fP.
.PP
.SS "Public Methods"

.in +1c
.ti -1c
.RI "\fBDate\fP (time_t tm)"
.br
.ti -1c
.RI "\fBDate\fP (tm *dt)"
.br
.ti -1c
.RI "\fBDate\fP (char *str, size_t \fBsize\fP=0)"
.br
.ti -1c
.RI "\fBDate\fP (int year, unsigned month, unsigned day)"
.br
.ti -1c
.RI "\fBDate\fP ()"
.br
.ti -1c
.RI "int \fBgetYear\fP (void) const"
.br
.ti -1c
.RI "unsigned \fBgetMonth\fP (void) const"
.br
.ti -1c
.RI "unsigned \fBgetDay\fP (void) const"
.br
.ti -1c
.RI "unsigned \fBgetDayOfWeek\fP (void) const"
.br
.ti -1c
.RI "char * \fBgetDate\fP (char *buffer) const"
.br
.ti -1c
.RI "time_t \fBgetDate\fP (void) const"
.br
.ti -1c
.RI "time_t \fBgetDate\fP (tm *buf) const"
.br
.ti -1c
.RI "long \fBgetValue\fP (void) const"
.br
.ti -1c
.RI "void \fBsetDate\fP (const char *str, size_t \fBsize\fP=0)"
.br
.ti -1c
.RI "bool \fBisValid\fP (void) const"
.br
.ti -1c
.RI "\fBoperator long\fP () const"
.br
.ti -1c
.RI "std::string \fBoperator()\fP () const"
.br
.ti -1c
.RI "Date & \fBoperator++\fP ()"
.br
.ti -1c
.RI "Date & \fBoperator--\fP ()"
.br
.ti -1c
.RI "Date & \fBoperator+=\fP (long val)"
.br
.ti -1c
.RI "Date & \fBoperator-=\fP (long val)"
.br
.ti -1c
.RI "int \fBoperator==\fP (Date &date)"
.br
.ti -1c
.RI "int \fBoperator!=\fP (Date &date)"
.br
.ti -1c
.RI "int \fBoperator<\fP (Date &date)"
.br
.ti -1c
.RI "int \fBoperator<=\fP (Date &date)"
.br
.ti -1c
.RI "int \fBoperator>\fP (Date &date)"
.br
.ti -1c
.RI "int \fBoperator>=\fP (Date &date)"
.br
.ti -1c
.RI "bool \fBoperator!\fP () const"
.br
.in -1c
.SS "Protected Methods"

.in +1c
.ti -1c
.RI "void \fBtoJulian\fP (long year, long month, long day)"
.br
.ti -1c
.RI "void \fBfromJulian\fP (char *buf) const"
.br
.ti -1c
.RI "virtual void \fBupdate\fP (void)"
.br
.RI "\fIA method to use to 'post' any changed values when shadowing a mixed object class.\fP"
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "long \fBjulian\fP"
.br
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "Date \fBoperator+\fP (Date &date, long val)"
.br
.ti -1c
.RI "Date \fBoperator-\fP (Date &date, long val)"
.br
.ti -1c
.RI "Date \fBoperator+\fP (long val, Date &date)"
.br
.ti -1c
.RI "Date \fBoperator-\fP (long val, Date &date)"
.br
.in -1c
.SH "DETAILED DESCRIPTION"
.PP 
The Date class uses a julian date representation of the current year, month, and day. julian number based date class.
.PP
This is then manipulated in several forms and may be exported as needed.
.PP
\fBAuthor: \fP
.in +1c
David Sugar <dyfet@ostel.com> 
.PP
.SH "CONSTRUCTOR & DESTRUCTOR DOCUMENTATION"
.PP 
.SS "Date::Date (time_t tm)"
.PP
.SS "Date::Date (tm * dt)"
.PP
.SS "Date::Date (char * str, size_t size = 0)"
.PP
.SS "Date::Date (int year, unsigned month, unsigned day)"
.PP
.SS "Date::Date ()"
.PP
.SH "MEMBER FUNCTION DOCUMENTATION"
.PP 
.SS "void Date::fromJulian (char * buf) const\fC [protected]\fP"
.PP
.SS "time_t Date::getDate (tm * buf) const"
.PP
.SS "time_t Date::getDate (void) const"
.PP
.SS "char* Date::getDate (char * buffer) const"
.PP
.SS "unsigned Date::getDay (void) const"
.PP
.SS "unsigned Date::getDayOfWeek (void) const"
.PP
.SS "unsigned Date::getMonth (void) const"
.PP
.SS "long Date::getValue (void) const"
.PP
.SS "int Date::getYear (void) const"
.PP
.SS "bool Date::isValid (void) const"
.PP
Reimplemented in \fBDatetime\fP.
.SS "Date::operator long () const\fC [inline]\fP"
.PP
.SS "bool Date::operator! (void) const\fC [inline]\fP"
.PP
.SS "int Date::operator!= (Date & date)"
.PP
.SS "std::string Date::operator() ()"
.PP
.SS "Date& Date::operator++ ()"
.PP
.SS "Date& Date::operator+= (long val)"
.PP
.SS "Date& Date::operator-- ()"
.PP
.SS "Date& Date::operator-= (long val)"
.PP
.SS "int Date::operator< (Date & date)"
.PP
.SS "int Date::operator<= (Date & date)"
.PP
.SS "int Date::operator== (Date & date)"
.PP
.SS "int Date::operator> (Date & date)"
.PP
.SS "int Date::operator>= (Date & date)"
.PP
.SS "void Date::setDate (const char * str, size_t size = 0)"
.PP
.SS "void Date::toJulian (long year, long month, long day)\fC [protected]\fP"
.PP
.SS "virtual void Date::update (void)\fC [inline, protected, virtual]\fP"
.PP
A method to use to 'post' any changed values when shadowing a mixed object class.
.PP
This is used by \fBDateNumber\fP. 
.PP
Reimplemented in \fBDateNumber\fP.
.SH "FRIENDS AND RELATED FUNCTION DOCUMENTATION"
.PP 
.SS "Date operator+ (long val, Date & date)\fC [friend]\fP"
.PP
.SS "Date operator+ (Date & date, long val)\fC [friend]\fP"
.PP
.SS "Date operator- (long val, Date & date)\fC [friend]\fP"
.PP
.SS "Date operator- (Date & date, long val)\fC [friend]\fP"
.PP
.SH "MEMBER DATA DOCUMENTATION"
.PP 
.SS "long Date::julian\fC [protected]\fP"
.PP


.SH "AUTHOR"
.PP 
Generated automatically by Doxygen for CommonC++ from the source code.