line |
true |
false |
branch |
53
|
0 |
1143 |
if (y < 0) { |
63
|
605 |
36 |
if (m < 1 || m > 12) { |
|
43 |
562 |
if (m < 1 || m > 12) { |
66
|
58 |
21 |
if (m < 1) |
69
|
0 |
641 |
assert(m >= 1); |
70
|
0 |
641 |
assert(m <= 12); |
71
|
428 |
213 |
return dt_from_yd(y, days_preceding_month[LEAP_YEAR(y)][m] + d); |
|
88 |
340 |
return dt_from_yd(y, days_preceding_month[LEAP_YEAR(y)][m] + d); |
|
84 |
4 |
return dt_from_yd(y, days_preceding_month[LEAP_YEAR(y)][m] + d); |
76
|
111 |
0 |
if (q < 1 || q > 4) { |
|
3 |
108 |
if (q < 1 || q > 4) { |
79
|
0 |
3 |
if (q < 1) |
82
|
0 |
111 |
assert(q >= 1); |
83
|
0 |
111 |
assert(q <= 4); |
84
|
101 |
10 |
return dt_from_yd(y, days_preceding_quarter[LEAP_YEAR(y)][q] + d); |
|
0 |
101 |
return dt_from_yd(y, days_preceding_quarter[LEAP_YEAR(y)][q] + d); |
|
0 |
0 |
return dt_from_yd(y, days_preceding_quarter[LEAP_YEAR(y)][q] + d); |
110
|
9153 |
450 |
if (d >= DT1901 && d <= DT2099) { |
|
8278 |
875 |
if (d >= DT1901 && d <= DT2099) { |
120
|
0 |
1325 |
if (d < 1) { |
140
|
1325 |
0 |
if (n100 == 4 || n1 == 4) |
|
0 |
1325 |
if (n100 == 4 || n1 == 4) |
145
|
9190 |
413 |
if (yp) *yp = y; |
146
|
7919 |
1684 |
if (dp) *dp = (int)d; |
154
|
4578 |
2659 |
l = LEAP_YEAR(y); |
|
536 |
4042 |
l = LEAP_YEAR(y); |
|
500 |
36 |
l = LEAP_YEAR(y); |
155
|
5272 |
1965 |
m = doy < 32 ? 1 : 1 + (5 * (doy - 59 - l) + 303) / 153; |
157
|
0 |
7237 |
assert(m >= 1); |
158
|
0 |
7237 |
assert(m <= 12); |
160
|
5534 |
1703 |
if (yp) *yp = y; |
161
|
6278 |
959 |
if (mp) *mp = m; |
162
|
6284 |
953 |
if (dp) *dp = doy - days_preceding_month[l][m]; |
170
|
203 |
18 |
l = LEAP_YEAR(y); |
|
0 |
203 |
l = LEAP_YEAR(y); |
|
0 |
0 |
l = LEAP_YEAR(y); |
171
|
211 |
10 |
q = doy < 91 ? 1 : 1 + (5 * (doy - 59 - l) + 303) / 459; |
173
|
0 |
221 |
assert(q >= 1); |
174
|
0 |
221 |
assert(q <= 4); |
176
|
119 |
102 |
if (yp) *yp = y; |
177
|
126 |
95 |
if (qp) *qp = q; |
178
|
95 |
126 |
if (dp) *dp = doy - days_preceding_quarter[l][q]; |
188
|
0 |
48 |
if (doy < 1) { |
190
|
0 |
0 |
doy += DAYS_IN_YEAR(y); |
|
0 |
0 |
doy += DAYS_IN_YEAR(y); |
|
0 |
0 |
doy += DAYS_IN_YEAR(y); |
192
|
0 |
48 |
else if (doy > 365) { |
193
|
0 |
0 |
const int diy = DAYS_IN_YEAR(y); |
|
0 |
0 |
const int diy = DAYS_IN_YEAR(y); |
|
0 |
0 |
const int diy = DAYS_IN_YEAR(y); |
194
|
0 |
0 |
if (doy > diy) { |
199
|
28 |
20 |
if (yp) *yp = y; |
200
|
20 |
28 |
if (wp) *wp = (doy + 6) / 7; |
201
|
0 |
48 |
if (dp) *dp = dow; |
212
|
30 |
291 |
if (dow < 1) |
214
|
0 |
321 |
assert(dow >= 1); |
215
|
0 |
321 |
assert(dow <= 7); |