Mercurial > hg > nginx-quic
comparison src/http/ngx_http_parse_time.c @ 1062:bc9751affada
style and comment fix
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 19 Jan 2007 11:35:26 +0000 |
parents | e3e0b20d8eb2 |
children | 8d3d224cae20 |
comparison
equal
deleted
inserted
replaced
1061:9aca452fe12a | 1062:bc9751affada |
---|---|
241 * shift new year to March 1 and start months from 1 (not 0), | 241 * shift new year to March 1 and start months from 1 (not 0), |
242 * it is needed for Gauss's formula | 242 * it is needed for Gauss's formula |
243 */ | 243 */ |
244 | 244 |
245 if (--month <= 0) { | 245 if (--month <= 0) { |
246 month += 12; | 246 month += 12; |
247 year -= 1; | 247 year -= 1; |
248 } | 248 } |
249 | 249 |
250 /* Gauss's formula for Grigorian days from 1 March 1 BC */ | 250 /* Gauss's formula for Grigorian days from 1 March 1 BC */ |
251 | 251 |
252 return (365 * year + year / 4 - year / 100 + year / 400 | 252 return (365 * year + year / 4 - year / 100 + year / 400 |
253 + 367 * month / 12 - 31 | 253 + 367 * month / 12 - 31 |
254 + day | 254 + day |
255 | 255 |
256 /* | 256 /* |
257 * 719527 days were between March 1, 1 BC and March 1, 1970, | 257 * 719527 days were between March 1, 1 BC and March 1, 1970, |
258 * 31 and 28 days in January and February 1970 | 258 * 31 and 28 days were in January and February 1970 |
259 */ | 259 */ |
260 | 260 |
261 - 719527 + 31 + 28) * 86400 + hour * 3600 + min * 60 + sec; | 261 - 719527 + 31 + 28) * 86400 + hour * 3600 + min * 60 + sec; |
262 } | 262 } |