| [ QuizWit ] in KIDS 글 쓴 이(By): pomp (위풍당당) 날 짜 (Date): 2000년 1월 14일 금요일 오후 09시 19분 55초 제 목(Title): Re: [질문] 연월일 입력하면 요일이 나오는. Zeller's formula 말이죠? The following is Zeller's Formula: A = INT(2.6*M - 0.1) + D + Y + INT(Y / 4) + INT( C/4) - (2*C) X = A - 7*INT(A/7) *Note that the INT( ) means only consider the integer part of the number. That is ignore the numbers after the decimal point.* The number X is a number between 0 and 6, because all multiples of 7 smaller than A have been subtracted from A. These numbers represent the 7 days of the week as follows: 0: Sunday, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday. The numbers D, M, Y and C are defined as follows: D: the day of the month. M: the number of the month - but not the standard number. January and February are numbers 11 and 12 of the preceding year (affecting Y and possibly C described bellow). March is number 1, April is 2, May is 3, ...., and December is number 10. Y: the year in the century. C: the number of hundreds in the year, in other words, the first two digits in the year number. ----- Do you like Elgar? |