|
안녕하세요?
엑셀에서 양력↔음력을 변환할 수 있는 방법을 소개해 드리오니... 필요시 활용해 보시기 바랍니다.
먼저 엑셀 실행 후에
1. alt+F11 키를 눌러 VBE (Visual Basic Edit) 창을 엽니다.
2. 삽입-모듈 메뉴를 실행하여 모듈시트를 추가합니다.
3. 하단의 Option 부터 시작되는 코드를 복사하여 모듈시트에 붙여넣기를 합니다.
4. VBE 창을 닫고 엑셀 시트로 돌아 옵니다.
[사용법]
- 양력을 음력으로 변환하는 함수 : SunToLun(년,월,일)
- 음력을 양력으로 변환하는 함수 : LunToSun(년,월,일,윤달구분)
"윤달구분"은 음력이 윤달인 경우에는 1, 아닌 경우는 0을 넣습니다.
첨부 예제 참고하시기 바랍니다.
감사합니다.
----------------------------------------------------------------------------------------
Option Explicit
Dim EM(1 To 130, 1 To 13) As Integer, MT(12) As Integer
Dim VM(6) As Integer
Dim CY As Integer, CM As Integer, CD As Integer, CA As Boolean
Sub CalenderData()
'mt(12) 배열은 양력각달의 크기를 누적합산한 값을 저장한 것임(평년기준, 즉 1년 365일)
MT(1) = 31: MT(2) = 59: MT(3) = 90: MT(4) = 120: MT(5) = 151: MT(6) = 181: MT(7) = 212: MT(8) = 243: MT(9) = 273: MT(10) = 304: MT(11) = 334: MT(12) = 365
'VM(6) 배열은 1과 2는 음력각달의 크기를 3~6은 윤달과같은달의 크기와 윤달의크기를 합한값을 저장한 것임
VM(1) = 29: VM(2) = 30: VM(3) = 29 + 29: VM(4) = 29 + 30: VM(5) = 30 + 29: VM(6) = 30 + 30
'EM(?,?) 배열은 1901년부터 2030년까지의 음력 각달의 크기를 VM(6) 배열값으로 저장하고 마지막 배열은 음력 총일수를 저장함
EM(1, 1) = 1: EM(1, 2) = 2: EM(1, 3) = 1: EM(1, 4) = 1: EM(1, 5) = 2: EM(1, 6) = 1: EM(1, 7) = 2: EM(1, 8) = 1: EM(1, 9) = 2: EM(1, 10) = 2: EM(1, 11) = 2: EM(1, 12) = 1: EM(1, 13) = 354 '1901년
EM(2, 1) = 2: EM(2, 2) = 1: EM(2, 3) = 2: EM(2, 4) = 1: EM(2, 5) = 1: EM(2, 6) = 2: EM(2, 7) = 1: EM(2, 8) = 2: EM(2, 9) = 1: EM(2, 10) = 2: EM(2, 11) = 2: EM(2, 12) = 2: EM(2, 13) = 355 '1902년
EM(3, 1) = 1: EM(3, 2) = 2: EM(3, 3) = 1: EM(3, 4) = 2: EM(3, 5) = 3: EM(3, 6) = 2: EM(3, 7) = 1: EM(3, 8) = 1: EM(3, 9) = 2: EM(3, 10) = 2: EM(3, 11) = 1: EM(3, 12) = 2: EM(3, 13) = 383 '1903년
EM(4, 1) = 2: EM(4, 2) = 2: EM(4, 3) = 1: EM(4, 4) = 2: EM(4, 5) = 1: EM(4, 6) = 1: EM(4, 7) = 2: EM(4, 8) = 1: EM(4, 9) = 1: EM(4, 10) = 2: EM(4, 11) = 2: EM(4, 12) = 1: EM(4, 13) = 354 '1904년
EM(5, 1) = 2: EM(5, 2) = 2: EM(5, 3) = 1: EM(5, 4) = 2: EM(5, 5) = 2: EM(5, 6) = 1: EM(5, 7) = 1: EM(5, 8) = 2: EM(5, 9) = 1: EM(5, 10) = 2: EM(5, 11) = 1: EM(5, 12) = 2: EM(5, 13) = 355 '1905년
EM(6, 1) = 1: EM(6, 2) = 2: EM(6, 3) = 2: EM(6, 4) = 4: EM(6, 5) = 1: EM(6, 6) = 2: EM(6, 7) = 1: EM(6, 8) = 2: EM(6, 9) = 1: EM(6, 10) = 2: EM(6, 11) = 1: EM(6, 12) = 2: EM(6, 13) = 384 '1906년
EM(7, 1) = 1: EM(7, 2) = 2: EM(7, 3) = 1: EM(7, 4) = 2: EM(7, 5) = 1: EM(7, 6) = 2: EM(7, 7) = 2: EM(7, 8) = 1: EM(7, 9) = 2: EM(7, 10) = 1: EM(7, 11) = 2: EM(7, 12) = 1: EM(7, 13) = 354 '1907년
EM(8, 1) = 2: EM(8, 2) = 1: EM(8, 3) = 1: EM(8, 4) = 2: EM(8, 5) = 2: EM(8, 6) = 1: EM(8, 7) = 2: EM(8, 8) = 1: EM(8, 9) = 2: EM(8, 10) = 2: EM(8, 11) = 1: EM(8, 12) = 2: EM(8, 13) = 355 '1908년
EM(9, 1) = 1: EM(9, 2) = 5: EM(9, 3) = 1: EM(9, 4) = 2: EM(9, 5) = 1: EM(9, 6) = 2: EM(9, 7) = 1: EM(9, 8) = 2: EM(9, 9) = 2: EM(9, 10) = 2: EM(9, 11) = 1: EM(9, 12) = 2: EM(9, 13) = 384 '1909년
EM(10, 1) = 1: EM(10, 2) = 2: EM(10, 3) = 1: EM(10, 4) = 1: EM(10, 5) = 2: EM(10, 6) = 1: EM(10, 7) = 2: EM(10, 8) = 1: EM(10, 9) = 2: EM(10, 10) = 2: EM(10, 11) = 2: EM(10, 12) = 1: EM(10, 13) = 354 '1910년
EM(11, 1) = 2: EM(11, 2) = 1: EM(11, 3) = 2: EM(11, 4) = 1: EM(11, 5) = 1: EM(11, 6) = 5: EM(11, 7) = 1: EM(11, 8) = 2: EM(11, 9) = 2: EM(11, 10) = 1: EM(11, 11) = 2: EM(11, 12) = 2: EM(11, 13) = 384 '1911년
EM(12, 1) = 2: EM(12, 2) = 1: EM(12, 3) = 1: EM(12, 4) = 1: EM(12, 5) = 1: EM(12, 6) = 2: EM(12, 7) = 1: EM(12, 8) = 1: EM(12, 9) = 2: EM(12, 10) = 2: EM(12, 11) = 1: EM(12, 12) = 2: EM(12, 13) = 354 '1912년
EM(13, 1) = 2: EM(13, 2) = 2: EM(13, 3) = 1: EM(13, 4) = 2: EM(13, 5) = 1: EM(13, 6) = 1: EM(13, 7) = 2: EM(13, 8) = 1: EM(13, 9) = 1: EM(13, 10) = 2: EM(13, 11) = 1: EM(13, 12) = 2: EM(13, 13) = 354 '1913년
EM(14, 1) = 2: EM(14, 2) = 2: EM(14, 3) = 1: EM(14, 4) = 2: EM(14, 5) = 5: EM(14, 6) = 1: EM(14, 7) = 2: EM(14, 8) = 1: EM(14, 9) = 2: EM(14, 10) = 1: EM(14, 11) = 1: EM(14, 12) = 2: EM(14, 13) = 384 '1914년
EM(15, 1) = 2: EM(15, 2) = 1: EM(15, 3) = 2: EM(15, 4) = 2: EM(15, 5) = 1: EM(15, 6) = 2: EM(15, 7) = 1: EM(15, 8) = 2: EM(15, 9) = 1: EM(15, 10) = 2: EM(15, 11) = 1: EM(15, 12) = 2: EM(15, 13) = 355 '1915년
EM(16, 1) = 1: EM(16, 2) = 2: EM(16, 3) = 1: EM(16, 4) = 2: EM(16, 5) = 1: EM(16, 6) = 2: EM(16, 7) = 2: EM(16, 8) = 1: EM(16, 9) = 2: EM(16, 10) = 1: EM(16, 11) = 2: EM(16, 12) = 1: EM(16, 13) = 354 '1916년
EM(17, 1) = 2: EM(17, 2) = 3: EM(17, 3) = 2: EM(17, 4) = 2: EM(17, 5) = 2: EM(17, 6) = 2: EM(17, 7) = 1: EM(17, 8) = 2: EM(17, 9) = 2: EM(17, 10) = 1: EM(17, 11) = 2: EM(17, 12) = 1: EM(17, 13) = 384 '1917년
EM(18, 1) = 2: EM(18, 2) = 1: EM(18, 3) = 1: EM(18, 4) = 1: EM(18, 5) = 1: EM(18, 6) = 2: EM(18, 7) = 1: EM(18, 8) = 2: EM(18, 9) = 2: EM(18, 10) = 2: EM(18, 11) = 1: EM(18, 12) = 1: EM(18, 13) = 355 '1918년
EM(19, 1) = 1: EM(19, 2) = 2: EM(19, 3) = 1: EM(19, 4) = 1: EM(19, 5) = 2: EM(19, 6) = 1: EM(19, 7) = 5: EM(19, 8) = 2: EM(19, 9) = 2: EM(19, 10) = 1: EM(19, 11) = 2: EM(19, 12) = 2: EM(19, 13) = 384 '1919년
EM(20, 1) = 1: EM(20, 2) = 2: EM(20, 3) = 1: EM(20, 4) = 1: EM(20, 5) = 2: EM(20, 6) = 1: EM(20, 7) = 1: EM(20, 8) = 2: EM(20, 9) = 2: EM(20, 10) = 1: EM(20, 11) = 2: EM(20, 12) = 2: EM(20, 13) = 354 '1920년
EM(21, 1) = 2: EM(21, 2) = 1: EM(21, 3) = 2: EM(21, 4) = 1: EM(21, 5) = 1: EM(21, 6) = 2: EM(21, 7) = 1: EM(21, 8) = 1: EM(21, 9) = 2: EM(21, 10) = 1: EM(21, 11) = 2: EM(21, 12) = 2: EM(21, 13) = 354 '1921년
EM(22, 1) = 2: EM(22, 2) = 1: EM(22, 3) = 2: EM(22, 4) = 2: EM(22, 5) = 3: EM(22, 6) = 2: EM(22, 7) = 1: EM(22, 8) = 1: EM(22, 9) = 2: EM(22, 10) = 1: EM(22, 11) = 2: EM(22, 12) = 2: EM(22, 13) = 384 '1922년
EM(23, 1) = 1: EM(23, 2) = 2: EM(23, 3) = 2: EM(23, 4) = 1: EM(23, 5) = 2: EM(23, 6) = 1: EM(23, 7) = 2: EM(23, 8) = 1: EM(23, 9) = 2: EM(23, 10) = 1: EM(23, 11) = 1: EM(23, 12) = 2: EM(23, 13) = 354 '1923년
EM(24, 1) = 2: EM(24, 2) = 1: EM(24, 3) = 2: EM(24, 4) = 1: EM(24, 5) = 2: EM(24, 6) = 2: EM(24, 7) = 1: EM(24, 8) = 2: EM(24, 9) = 1: EM(24, 10) = 2: EM(24, 11) = 1: EM(24, 12) = 1: EM(24, 13) = 354 '1924년
EM(25, 1) = 2: EM(25, 2) = 1: EM(25, 3) = 2: EM(25, 4) = 5: EM(25, 5) = 2: EM(25, 6) = 1: EM(25, 7) = 2: EM(25, 8) = 2: EM(25, 9) = 1: EM(25, 10) = 2: EM(25, 11) = 1: EM(25, 12) = 2: EM(25, 13) = 385 '1925년
EM(26, 1) = 1: EM(26, 2) = 1: EM(26, 3) = 2: EM(26, 4) = 1: EM(26, 5) = 2: EM(26, 6) = 1: EM(26, 7) = 2: EM(26, 8) = 2: EM(26, 9) = 1: EM(26, 10) = 2: EM(26, 11) = 2: EM(26, 12) = 1: EM(26, 13) = 354 '1926년
EM(27, 1) = 2: EM(27, 2) = 1: EM(27, 3) = 1: EM(27, 4) = 2: EM(27, 5) = 1: EM(27, 6) = 2: EM(27, 7) = 1: EM(27, 8) = 2: EM(27, 9) = 2: EM(27, 10) = 1: EM(27, 11) = 2: EM(27, 12) = 2: EM(27, 13) = 355 '1927년
EM(28, 1) = 1: EM(28, 2) = 5: EM(28, 3) = 1: EM(28, 4) = 2: EM(28, 5) = 1: EM(28, 6) = 1: EM(28, 7) = 2: EM(28, 8) = 2: EM(28, 9) = 1: EM(28, 10) = 2: EM(28, 11) = 2: EM(28, 12) = 2: EM(28, 13) = 384 '1928년
EM(29, 1) = 1: EM(29, 2) = 2: EM(29, 3) = 1: EM(29, 4) = 1: EM(29, 5) = 2: EM(29, 6) = 1: EM(29, 7) = 1: EM(29, 8) = 2: EM(29, 9) = 1: EM(29, 10) = 2: EM(29, 11) = 2: EM(29, 12) = 2: EM(29, 13) = 354 '1929년
EM(30, 1) = 1: EM(30, 2) = 2: EM(30, 3) = 2: EM(30, 4) = 1: EM(30, 5) = 1: EM(30, 6) = 5: EM(30, 7) = 1: EM(30, 8) = 2: EM(30, 9) = 1: EM(30, 10) = 2: EM(30, 11) = 2: EM(30, 12) = 1: EM(30, 13) = 383 '1930
EM(31, 1) = 2: EM(31, 2) = 2: EM(31, 3) = 2: EM(31, 4) = 1: EM(31, 5) = 1: EM(31, 6) = 2: EM(31, 7) = 1: EM(31, 8) = 1: EM(31, 9) = 2: EM(31, 10) = 1: EM(31, 11) = 2: EM(31, 12) = 1: EM(31, 13) = 354 '1931년
EM(32, 1) = 2: EM(32, 2) = 2: EM(32, 3) = 2: EM(32, 4) = 1: EM(32, 5) = 2: EM(32, 6) = 1: EM(32, 7) = 2: EM(32, 8) = 1: EM(32, 9) = 1: EM(32, 10) = 2: EM(32, 11) = 1: EM(32, 12) = 2: EM(32, 13) = 355 '1932년
EM(33, 1) = 1: EM(33, 2) = 2: EM(33, 3) = 2: EM(33, 4) = 1: EM(33, 5) = 6: EM(33, 6) = 1: EM(33, 7) = 2: EM(33, 8) = 1: EM(33, 9) = 2: EM(33, 10) = 1: EM(33, 11) = 1: EM(33, 12) = 2: EM(33, 13) = 384 '1933년
EM(34, 1) = 1: EM(34, 2) = 2: EM(34, 3) = 1: EM(34, 4) = 2: EM(34, 5) = 2: EM(34, 6) = 1: EM(34, 7) = 2: EM(34, 8) = 2: EM(34, 9) = 1: EM(34, 10) = 2: EM(34, 11) = 1: EM(34, 12) = 2: EM(34, 13) = 355 '1934년
EM(35, 1) = 1: EM(35, 2) = 1: EM(35, 3) = 2: EM(35, 4) = 1: EM(35, 5) = 2: EM(35, 6) = 1: EM(35, 7) = 2: EM(35, 8) = 2: EM(35, 9) = 1: EM(35, 10) = 2: EM(35, 11) = 2: EM(35, 12) = 1: EM(35, 13) = 354 '1935년
EM(36, 1) = 2: EM(36, 2) = 1: EM(36, 3) = 4: EM(36, 4) = 1: EM(36, 5) = 2: EM(36, 6) = 1: EM(36, 7) = 2: EM(36, 8) = 1: EM(36, 9) = 2: EM(36, 10) = 2: EM(36, 11) = 2: EM(36, 12) = 1: EM(36, 13) = 384 '1936년
EM(37, 1) = 2: EM(37, 2) = 1: EM(37, 3) = 1: EM(37, 4) = 2: EM(37, 5) = 1: EM(37, 6) = 1: EM(37, 7) = 2: EM(37, 8) = 1: EM(37, 9) = 2: EM(37, 10) = 2: EM(37, 11) = 2: EM(37, 12) = 1: EM(37, 13) = 354 '1937년
EM(38, 1) = 2: EM(38, 2) = 2: EM(38, 3) = 1: EM(38, 4) = 1: EM(38, 5) = 2: EM(38, 6) = 1: EM(38, 7) = 4: EM(38, 8) = 1: EM(38, 9) = 2: EM(38, 10) = 2: EM(38, 11) = 2: EM(38, 12) = 1: EM(38, 13) = 384 '1938년
EM(39, 1) = 2: EM(39, 2) = 2: EM(39, 3) = 1: EM(39, 4) = 1: EM(39, 5) = 2: EM(39, 6) = 1: EM(39, 7) = 1: EM(39, 8) = 2: EM(39, 9) = 1: EM(39, 10) = 2: EM(39, 11) = 1: EM(39, 12) = 2: EM(39, 13) = 354 '1939년
EM(40, 1) = 2: EM(40, 2) = 2: EM(40, 3) = 1: EM(40, 4) = 2: EM(40, 5) = 1: EM(40, 6) = 2: EM(40, 7) = 1: EM(40, 8) = 1: EM(40, 9) = 2: EM(40, 10) = 1: EM(40, 11) = 2: EM(40, 12) = 1: EM(40, 13) = 354 '1940년
EM(41, 1) = 2: EM(41, 2) = 2: EM(41, 3) = 1: EM(41, 4) = 2: EM(41, 5) = 2: EM(41, 6) = 4: EM(41, 7) = 1: EM(41, 8) = 1: EM(41, 9) = 2: EM(41, 10) = 1: EM(41, 11) = 2: EM(41, 12) = 1: EM(41, 13) = 384 '1941년
EM(42, 1) = 2: EM(42, 2) = 1: EM(42, 3) = 2: EM(42, 4) = 2: EM(42, 5) = 1: EM(42, 6) = 2: EM(42, 7) = 2: EM(42, 8) = 1: EM(42, 9) = 2: EM(42, 10) = 1: EM(42, 11) = 1: EM(42, 12) = 2: EM(42, 13) = 355 '1942년
EM(43, 1) = 1: EM(43, 2) = 2: EM(43, 3) = 1: EM(43, 4) = 2: EM(43, 5) = 1: EM(43, 6) = 2: EM(43, 7) = 2: EM(43, 8) = 1: EM(43, 9) = 2: EM(43, 10) = 2: EM(43, 11) = 1: EM(43, 12) = 2: EM(43, 13) = 355 '1943년
EM(44, 1) = 1: EM(44, 2) = 1: EM(44, 3) = 2: EM(44, 4) = 4: EM(44, 5) = 1: EM(44, 6) = 2: EM(44, 7) = 1: EM(44, 8) = 2: EM(44, 9) = 2: EM(44, 10) = 1: EM(44, 11) = 2: EM(44, 12) = 2: EM(44, 13) = 384 '1944년
EM(45, 1) = 1: EM(45, 2) = 1: EM(45, 3) = 2: EM(45, 4) = 1: EM(45, 5) = 1: EM(45, 6) = 2: EM(45, 7) = 1: EM(45, 8) = 2: EM(45, 9) = 2: EM(45, 10) = 2: EM(45, 11) = 1: EM(45, 12) = 2: EM(45, 13) = 354 '1945년
EM(46, 1) = 2: EM(46, 2) = 1: EM(46, 3) = 1: EM(46, 4) = 2: EM(46, 5) = 1: EM(46, 6) = 1: EM(46, 7) = 2: EM(46, 8) = 1: EM(46, 9) = 2: EM(46, 10) = 2: EM(46, 11) = 1: EM(46, 12) = 2: EM(46, 13) = 354 '1946년
EM(47, 1) = 2: EM(47, 2) = 5: EM(47, 3) = 1: EM(47, 4) = 2: EM(47, 5) = 1: EM(47, 6) = 1: EM(47, 7) = 2: EM(47, 8) = 1: EM(47, 9) = 2: EM(47, 10) = 1: EM(47, 11) = 2: EM(47, 12) = 2: EM(47, 13) = 384 '1947년
EM(48, 1) = 2: EM(48, 2) = 1: EM(48, 3) = 2: EM(48, 4) = 1: EM(48, 5) = 2: EM(48, 6) = 1: EM(48, 7) = 1: EM(48, 8) = 2: EM(48, 9) = 1: EM(48, 10) = 2: EM(48, 11) = 1: EM(48, 12) = 2: EM(48, 13) = 354 '1948년
EM(49, 1) = 2: EM(49, 2) = 2: EM(49, 3) = 1: EM(49, 4) = 2: EM(49, 5) = 1: EM(49, 6) = 2: EM(49, 7) = 3: EM(49, 8) = 2: EM(49, 9) = 1: EM(49, 10) = 2: EM(49, 11) = 1: EM(49, 12) = 2: EM(49, 13) = 384 '1949년
EM(50, 1) = 2: EM(50, 2) = 1: EM(50, 3) = 2: EM(50, 4) = 2: EM(50, 5) = 1: EM(50, 6) = 2: EM(50, 7) = 1: EM(50, 8) = 1: EM(50, 9) = 2: EM(50, 10) = 1: EM(50, 11) = 2: EM(50, 12) = 1: EM(50, 13) = 354 '1950년
EM(51, 1) = 2: EM(51, 2) = 1: EM(51, 3) = 2: EM(51, 4) = 2: EM(51, 5) = 1: EM(51, 6) = 2: EM(51, 7) = 1: EM(51, 8) = 2: EM(51, 9) = 1: EM(51, 10) = 2: EM(51, 11) = 1: EM(51, 12) = 2: EM(51, 13) = 355 '1951년
EM(52, 1) = 1: EM(52, 2) = 2: EM(52, 3) = 1: EM(52, 4) = 2: EM(52, 5) = 4: EM(52, 6) = 2: EM(52, 7) = 1: EM(52, 8) = 2: EM(52, 9) = 1: EM(52, 10) = 2: EM(52, 11) = 1: EM(52, 12) = 2: EM(52, 13) = 384 '1952년
EM(53, 1) = 1: EM(53, 2) = 2: EM(53, 3) = 1: EM(53, 4) = 1: EM(53, 5) = 2: EM(53, 6) = 2: EM(53, 7) = 1: EM(53, 8) = 2: EM(53, 9) = 2: EM(53, 10) = 1: EM(53, 11) = 2: EM(53, 12) = 2: EM(53, 13) = 355 '1953년
EM(54, 1) = 1: EM(54, 2) = 1: EM(54, 3) = 2: EM(54, 4) = 1: EM(54, 5) = 1: EM(54, 6) = 2: EM(54, 7) = 1: EM(54, 8) = 2: EM(54, 9) = 2: EM(54, 10) = 1: EM(54, 11) = 2: EM(54, 12) = 2: EM(54, 13) = 354 '1954년
EM(55, 1) = 2: EM(55, 2) = 1: EM(55, 3) = 4: EM(55, 4) = 1: EM(55, 5) = 1: EM(55, 6) = 2: EM(55, 7) = 1: EM(55, 8) = 2: EM(55, 9) = 1: EM(55, 10) = 2: EM(55, 11) = 2: EM(55, 12) = 2: EM(55, 13) = 384 '1955년
EM(56, 1) = 1: EM(56, 2) = 2: EM(56, 3) = 1: EM(56, 4) = 2: EM(56, 5) = 1: EM(56, 6) = 1: EM(56, 7) = 2: EM(56, 8) = 1: EM(56, 9) = 2: EM(56, 10) = 1: EM(56, 11) = 2: EM(56, 12) = 2: EM(56, 13) = 354 '1956년
EM(57, 1) = 2: EM(57, 2) = 1: EM(57, 3) = 2: EM(57, 4) = 1: EM(57, 5) = 2: EM(57, 6) = 1: EM(57, 7) = 1: EM(57, 8) = 5: EM(57, 9) = 2: EM(57, 10) = 1: EM(57, 11) = 2: EM(57, 12) = 2: EM(57, 13) = 384 '1957년
EM(58, 1) = 1: EM(58, 2) = 2: EM(58, 3) = 2: EM(58, 4) = 1: EM(58, 5) = 2: EM(58, 6) = 1: EM(58, 7) = 1: EM(58, 8) = 2: EM(58, 9) = 1: EM(58, 10) = 2: EM(58, 11) = 1: EM(58, 12) = 2: EM(58, 13) = 354 '1958년
EM(59, 1) = 1: EM(59, 2) = 2: EM(59, 3) = 2: EM(59, 4) = 1: EM(59, 5) = 2: EM(59, 6) = 1: EM(59, 7) = 2: EM(59, 8) = 1: EM(59, 9) = 2: EM(59, 10) = 1: EM(59, 11) = 2: EM(59, 12) = 1: EM(59, 13) = 354 '1959년
EM(60, 1) = 2: EM(60, 2) = 1: EM(60, 3) = 2: EM(60, 4) = 1: EM(60, 5) = 2: EM(60, 6) = 5: EM(60, 7) = 2: EM(60, 8) = 1: EM(60, 9) = 2: EM(60, 10) = 1: EM(60, 11) = 2: EM(60, 12) = 1: EM(60, 13) = 384 '1960년
EM(61, 1) = 2: EM(61, 2) = 1: EM(61, 3) = 2: EM(61, 4) = 1: EM(61, 5) = 2: EM(61, 6) = 1: EM(61, 7) = 2: EM(61, 8) = 2: EM(61, 9) = 1: EM(61, 10) = 2: EM(61, 11) = 1: EM(61, 12) = 2: EM(61, 13) = 355 '1961년
EM(62, 1) = 1: EM(62, 2) = 2: EM(62, 3) = 1: EM(62, 4) = 1: EM(62, 5) = 2: EM(62, 6) = 1: EM(62, 7) = 2: EM(62, 8) = 2: EM(62, 9) = 1: EM(62, 10) = 2: EM(62, 11) = 2: EM(62, 12) = 1: EM(62, 13) = 354 '1962년
EM(63, 1) = 2: EM(63, 2) = 1: EM(63, 3) = 2: EM(63, 4) = 3: EM(63, 5) = 2: EM(63, 6) = 1: EM(63, 7) = 2: EM(63, 8) = 1: EM(63, 9) = 2: EM(63, 10) = 2: EM(63, 11) = 2: EM(63, 12) = 1: EM(63, 13) = 384 '1963년
EM(64, 1) = 2: EM(64, 2) = 1: EM(64, 3) = 2: EM(64, 4) = 1: EM(64, 5) = 1: EM(64, 6) = 2: EM(64, 7) = 1: EM(64, 8) = 2: EM(64, 9) = 1: EM(64, 10) = 2: EM(64, 11) = 2: EM(64, 12) = 2: EM(64, 13) = 355 '1964년
EM(65, 1) = 1: EM(65, 2) = 2: EM(65, 3) = 1: EM(65, 4) = 2: EM(65, 5) = 1: EM(65, 6) = 1: EM(65, 7) = 2: EM(65, 8) = 1: EM(65, 9) = 1: EM(65, 10) = 2: EM(65, 11) = 2: EM(65, 12) = 1: EM(65, 13) = 353 '1965년
EM(66, 1) = 2: EM(66, 2) = 2: EM(66, 3) = 5: EM(66, 4) = 2: EM(66, 5) = 1: EM(66, 6) = 1: EM(66, 7) = 2: EM(66, 8) = 1: EM(66, 9) = 1: EM(66, 10) = 2: EM(66, 11) = 2: EM(66, 12) = 1: EM(66, 13) = 384 '1966년
EM(67, 1) = 2: EM(67, 2) = 2: EM(67, 3) = 1: EM(67, 4) = 2: EM(67, 5) = 2: EM(67, 6) = 1: EM(67, 7) = 1: EM(67, 8) = 2: EM(67, 9) = 1: EM(67, 10) = 2: EM(67, 11) = 2: EM(67, 12) = 2: EM(67, 13) = 355 '1967년
EM(68, 1) = 1: EM(68, 2) = 2: EM(68, 3) = 2: EM(68, 4) = 1: EM(68, 5) = 2: EM(68, 6) = 1: EM(68, 7) = 5: EM(68, 8) = 2: EM(68, 9) = 1: EM(68, 10) = 2: EM(68, 11) = 2: EM(68, 12) = 2: EM(68, 13) = 384 '1968년
EM(69, 1) = 1: EM(69, 2) = 2: EM(69, 3) = 1: EM(69, 4) = 2: EM(69, 5) = 1: EM(69, 6) = 2: EM(69, 7) = 2: EM(69, 8) = 1: EM(69, 9) = 2: EM(69, 10) = 1: EM(69, 11) = 2: EM(69, 12) = 1: EM(69, 13) = 354 '1969년
EM(70, 1) = 2: EM(70, 2) = 1: EM(70, 3) = 1: EM(70, 4) = 2: EM(70, 5) = 2: EM(70, 6) = 1: EM(70, 7) = 2: EM(70, 8) = 1: EM(70, 9) = 2: EM(70, 10) = 2: EM(70, 11) = 2: EM(70, 12) = 2: EM(70, 13) = 355 '1970년
EM(71, 1) = 1: EM(71, 2) = 2: EM(71, 3) = 1: EM(71, 4) = 1: EM(71, 5) = 5: EM(71, 6) = 2: EM(71, 7) = 1: EM(71, 8) = 2: EM(71, 9) = 2: EM(71, 10) = 2: EM(71, 11) = 2: EM(71, 12) = 2: EM(71, 13) = 384 '1971년
EM(72, 1) = 1: EM(72, 2) = 2: EM(72, 3) = 1: EM(72, 4) = 1: EM(72, 5) = 2: EM(72, 6) = 1: EM(72, 7) = 2: EM(72, 8) = 1: EM(72, 9) = 2: EM(72, 10) = 2: EM(72, 11) = 2: EM(72, 12) = 1: EM(72, 13) = 354 '1972년
EM(73, 1) = 2: EM(73, 2) = 1: EM(73, 3) = 2: EM(73, 4) = 1: EM(73, 5) = 1: EM(73, 6) = 2: EM(73, 7) = 1: EM(73, 8) = 1: EM(73, 9) = 2: EM(73, 10) = 2: EM(73, 11) = 2: EM(73, 12) = 1: EM(73, 13) = 354 '1973년
EM(74, 1) = 2: EM(74, 2) = 2: EM(74, 3) = 1: EM(74, 4) = 5: EM(74, 5) = 1: EM(74, 6) = 2: EM(74, 7) = 1: EM(74, 8) = 1: EM(74, 9) = 2: EM(74, 10) = 2: EM(74, 11) = 2: EM(74, 12) = 2: EM(74, 13) = 384 '1974년
EM(75, 1) = 2: EM(75, 2) = 2: EM(75, 3) = 1: EM(75, 4) = 2: EM(75, 5) = 1: EM(75, 6) = 1: EM(75, 7) = 2: EM(75, 8) = 1: EM(75, 9) = 1: EM(75, 10) = 2: EM(75, 11) = 2: EM(75, 12) = 2: EM(75, 13) = 354 '1975년
EM(76, 1) = 2: EM(76, 2) = 2: EM(76, 3) = 1: EM(76, 4) = 2: EM(76, 5) = 1: EM(76, 6) = 2: EM(76, 7) = 1: EM(76, 8) = 5: EM(76, 9) = 2: EM(76, 10) = 1: EM(76, 11) = 2: EM(76, 12) = 2: EM(76, 13) = 384 '1976년
EM(77, 1) = 2: EM(77, 2) = 1: EM(77, 3) = 2: EM(77, 4) = 2: EM(77, 5) = 1: EM(77, 6) = 2: EM(77, 7) = 1: EM(77, 8) = 2: EM(77, 9) = 1: EM(77, 10) = 2: EM(77, 11) = 2: EM(77, 12) = 1: EM(77, 13) = 354 '1977년
EM(78, 1) = 2: EM(78, 2) = 2: EM(78, 3) = 1: EM(78, 4) = 2: EM(78, 5) = 1: EM(78, 6) = 2: EM(78, 7) = 2: EM(78, 8) = 1: EM(78, 9) = 2: EM(78, 10) = 1: EM(78, 11) = 2: EM(78, 12) = 1: EM(78, 13) = 355 '1978년
EM(79, 1) = 2: EM(79, 2) = 1: EM(79, 3) = 1: EM(79, 4) = 2: EM(79, 5) = 1: EM(79, 6) = 6: EM(79, 7) = 1: EM(79, 8) = 2: EM(79, 9) = 2: EM(79, 10) = 1: EM(79, 11) = 2: EM(79, 12) = 1: EM(79, 13) = 384 '1979년
EM(80, 1) = 2: EM(80, 2) = 1: EM(80, 3) = 1: EM(80, 4) = 2: EM(80, 5) = 1: EM(80, 6) = 2: EM(80, 7) = 1: EM(80, 8) = 2: EM(80, 9) = 2: EM(80, 10) = 1: EM(80, 11) = 2: EM(80, 12) = 2: EM(80, 13) = 355 '1980년
EM(81, 1) = 1: EM(81, 2) = 2: EM(81, 3) = 1: EM(81, 4) = 1: EM(81, 5) = 2: EM(81, 6) = 1: EM(81, 7) = 1: EM(81, 8) = 2: EM(81, 9) = 2: EM(81, 10) = 1: EM(81, 11) = 2: EM(81, 12) = 2: EM(81, 13) = 354 '1981년
EM(82, 1) = 2: EM(82, 2) = 1: EM(82, 3) = 2: EM(82, 4) = 3: EM(82, 5) = 2: EM(82, 6) = 1: EM(82, 7) = 1: EM(82, 8) = 2: EM(82, 9) = 2: EM(82, 10) = 1: EM(82, 11) = 2: EM(82, 12) = 2: EM(82, 13) = 384 '1982년
EM(83, 1) = 2: EM(83, 2) = 1: EM(83, 3) = 2: EM(83, 4) = 1: EM(83, 5) = 1: EM(83, 6) = 2: EM(83, 7) = 1: EM(83, 8) = 1: EM(83, 9) = 2: EM(83, 10) = 1: EM(83, 11) = 2: EM(83, 12) = 2: EM(83, 13) = 354 '1983년
EM(84, 1) = 2: EM(84, 2) = 1: EM(84, 3) = 2: EM(84, 4) = 2: EM(84, 5) = 1: EM(84, 6) = 1: EM(84, 7) = 2: EM(84, 8) = 1: EM(84, 9) = 1: EM(84, 10) = 5: EM(84, 11) = 2: EM(84, 12) = 2: EM(84, 13) = 384 '1984년
EM(85, 1) = 1: EM(85, 2) = 2: EM(85, 3) = 2: EM(85, 4) = 1: EM(85, 5) = 2: EM(85, 6) = 1: EM(85, 7) = 2: EM(85, 8) = 1: EM(85, 9) = 1: EM(85, 10) = 2: EM(85, 11) = 2: EM(85, 12) = 2: EM(85, 13) = 354 '1985년
EM(86, 1) = 1: EM(86, 2) = 2: EM(86, 3) = 2: EM(86, 4) = 1: EM(86, 5) = 2: EM(86, 6) = 2: EM(86, 7) = 1: EM(86, 8) = 2: EM(86, 9) = 1: EM(86, 10) = 2: EM(86, 11) = 2: EM(86, 12) = 1: EM(86, 13) = 354 '1986년
EM(87, 1) = 2: EM(87, 2) = 1: EM(87, 3) = 2: EM(87, 4) = 2: EM(87, 5) = 1: EM(87, 6) = 5: EM(87, 7) = 2: EM(87, 8) = 2: EM(87, 9) = 1: EM(87, 10) = 2: EM(87, 11) = 2: EM(87, 12) = 2: EM(87, 13) = 385 '1987년
EM(88, 1) = 1: EM(88, 2) = 1: EM(88, 3) = 2: EM(88, 4) = 1: EM(88, 5) = 2: EM(88, 6) = 1: EM(88, 7) = 2: EM(88, 8) = 2: EM(88, 9) = 1: EM(88, 10) = 2: EM(88, 11) = 2: EM(88, 12) = 1: EM(88, 13) = 354 '1988년
EM(89, 1) = 2: EM(89, 2) = 1: EM(89, 3) = 1: EM(89, 4) = 2: EM(89, 5) = 1: EM(89, 6) = 1: EM(89, 7) = 2: EM(89, 8) = 2: EM(89, 9) = 1: EM(89, 10) = 2: EM(89, 11) = 2: EM(89, 12) = 2: EM(89, 13) = 355 '1989년
EM(90, 1) = 1: EM(90, 2) = 2: EM(90, 3) = 1: EM(90, 4) = 1: EM(90, 5) = 5: EM(90, 6) = 1: EM(90, 7) = 2: EM(90, 8) = 1: EM(90, 9) = 2: EM(90, 10) = 2: EM(90, 11) = 2: EM(90, 12) = 2: EM(90, 13) = 384 '1990년
EM(91, 1) = 1: EM(91, 2) = 2: EM(91, 3) = 1: EM(91, 4) = 1: EM(91, 5) = 2: EM(91, 6) = 1: EM(91, 7) = 1: EM(91, 8) = 2: EM(91, 9) = 1: EM(91, 10) = 2: EM(91, 11) = 2: EM(91, 12) = 2: EM(91, 13) = 354 '1991년
EM(92, 1) = 1: EM(92, 2) = 2: EM(92, 3) = 2: EM(92, 4) = 1: EM(92, 5) = 1: EM(92, 6) = 2: EM(92, 7) = 1: EM(92, 8) = 1: EM(92, 9) = 2: EM(92, 10) = 1: EM(92, 11) = 2: EM(92, 12) = 2: EM(92, 13) = 354 '1992년
EM(93, 1) = 1: EM(93, 2) = 2: EM(93, 3) = 5: EM(93, 4) = 2: EM(93, 5) = 1: EM(93, 6) = 2: EM(93, 7) = 1: EM(93, 8) = 1: EM(93, 9) = 2: EM(93, 10) = 1: EM(93, 11) = 2: EM(93, 12) = 1: EM(93, 13) = 383 '1993년
EM(94, 1) = 2: EM(94, 2) = 2: EM(94, 3) = 2: EM(94, 4) = 1: EM(94, 5) = 2: EM(94, 6) = 1: EM(94, 7) = 2: EM(94, 8) = 1: EM(94, 9) = 1: EM(94, 10) = 2: EM(94, 11) = 1: EM(94, 12) = 2: EM(94, 13) = 355 '1994년
EM(95, 1) = 1: EM(95, 2) = 2: EM(95, 3) = 2: EM(95, 4) = 1: EM(95, 5) = 2: EM(95, 6) = 2: EM(95, 7) = 1: EM(95, 8) = 5: EM(95, 9) = 2: EM(95, 10) = 1: EM(95, 11) = 1: EM(95, 12) = 2: EM(95, 13) = 384 '1995년
EM(96, 1) = 1: EM(96, 2) = 2: EM(96, 3) = 1: EM(96, 4) = 2: EM(96, 5) = 2: EM(96, 6) = 1: EM(96, 7) = 2: EM(96, 8) = 1: EM(96, 9) = 2: EM(96, 10) = 2: EM(96, 11) = 1: EM(96, 12) = 2: EM(96, 13) = 355 '1996년
EM(97, 1) = 2: EM(97, 2) = 1: EM(97, 3) = 2: EM(97, 4) = 1: EM(97, 5) = 2: EM(97, 6) = 1: EM(97, 7) = 2: EM(97, 8) = 2: EM(97, 9) = 1: EM(97, 10) = 2: EM(97, 11) = 2: EM(97, 12) = 1: EM(97, 13) = 354 '1997년
EM(98, 1) = 2: EM(98, 2) = 1: EM(98, 3) = 1: EM(98, 4) = 2: EM(98, 5) = 3: EM(98, 6) = 2: EM(98, 7) = 2: EM(98, 8) = 1: EM(98, 9) = 2: EM(98, 10) = 2: EM(98, 11) = 1: EM(98, 12) = 2: EM(98, 13) = 384 '1998년
EM(99, 1) = 2: EM(99, 2) = 1: EM(99, 3) = 1: EM(99, 4) = 2: EM(99, 5) = 2: EM(99, 6) = 1: EM(99, 7) = 2: EM(99, 8) = 1: EM(99, 9) = 2: EM(99, 10) = 2: EM(99, 11) = 2: EM(99, 12) = 1: EM(99, 13) = 354 '1999년
EM(100, 1) = 2: EM(100, 2) = 2: EM(100, 3) = 1: EM(100, 4) = 1: EM(100, 5) = 2: EM(100, 6) = 1: EM(100, 7) = 1: EM(100, 8) = 2: EM(100, 9) = 1: EM(100, 10) = 2: EM(100, 11) = 2: EM(100, 12) = 1: EM(100, 13) = 354 '2000년
EM(101, 1) = 2: EM(101, 2) = 2: EM(101, 3) = 1: EM(101, 4) = 5: EM(101, 5) = 2: EM(101, 6) = 1: EM(101, 7) = 1: EM(101, 8) = 2: EM(101, 9) = 1: EM(101, 10) = 2: EM(101, 11) = 1: EM(101, 12) = 2: EM(101, 13) = 384 '2001년
EM(102, 1) = 2: EM(102, 2) = 2: EM(102, 3) = 1: EM(102, 4) = 2: EM(102, 5) = 1: EM(102, 6) = 2: EM(102, 7) = 1: EM(102, 8) = 1: EM(102, 9) = 2: EM(102, 10) = 1: EM(102, 11) = 2: EM(102, 12) = 1: EM(102, 13) = 354 '2002년
EM(103, 1) = 2: EM(103, 2) = 2: EM(103, 3) = 1: EM(103, 4) = 2: EM(103, 5) = 2: EM(103, 6) = 1: EM(103, 7) = 2: EM(103, 8) = 1: EM(103, 9) = 1: EM(103, 10) = 2: EM(103, 11) = 1: EM(103, 12) = 2: EM(103, 13) = 355 '2003년
EM(104, 1) = 1: EM(104, 2) = 5: EM(104, 3) = 2: EM(104, 4) = 2: EM(104, 5) = 1: EM(104, 6) = 2: EM(104, 7) = 1: EM(104, 8) = 2: EM(104, 9) = 1: EM(104, 10) = 2: EM(104, 11) = 1: EM(104, 12) = 2: EM(104, 13) = 384 '2004년
EM(105, 1) = 1: EM(105, 2) = 2: EM(105, 3) = 1: EM(105, 4) = 2: EM(105, 5) = 1: EM(105, 6) = 2: EM(105, 7) = 2: EM(105, 8) = 1: EM(105, 9) = 2: EM(105, 10) = 1: EM(105, 11) = 2: EM(105, 12) = 1: EM(105, 13) = 354 '2005년
EM(106, 1) = 2: EM(106, 2) = 1: EM(106, 3) = 2: EM(106, 4) = 1: EM(106, 5) = 2: EM(106, 6) = 1: EM(106, 7) = 5: EM(106, 8) = 2: EM(106, 9) = 2: EM(106, 10) = 1: EM(106, 11) = 2: EM(106, 12) = 2: EM(106, 13) = 385 '2006년
EM(107, 1) = 1: EM(107, 2) = 1: EM(107, 3) = 2: EM(107, 4) = 1: EM(107, 5) = 1: EM(107, 6) = 2: EM(107, 7) = 1: EM(107, 8) = 2: EM(107, 9) = 2: EM(107, 10) = 2: EM(107, 11) = 1: EM(107, 12) = 2: EM(107, 13) = 354 '2007년
EM(108, 1) = 2: EM(108, 2) = 1: EM(108, 3) = 1: EM(108, 4) = 2: EM(108, 5) = 1: EM(108, 6) = 1: EM(108, 7) = 2: EM(108, 8) = 1: EM(108, 9) = 2: EM(108, 10) = 2: EM(108, 11) = 1: EM(108, 12) = 2: EM(108, 13) = 354 '2008년
EM(109, 1) = 2: EM(109, 2) = 2: EM(109, 3) = 1: EM(109, 4) = 1: EM(109, 5) = 5: EM(109, 6) = 1: EM(109, 7) = 2: EM(109, 8) = 1: EM(109, 9) = 2: EM(109, 10) = 1: EM(109, 11) = 2: EM(109, 12) = 2: EM(109, 13) = 384 '2009년
EM(110, 1) = 2: EM(110, 2) = 1: EM(110, 3) = 2: EM(110, 4) = 1: EM(110, 5) = 2: EM(110, 6) = 1: EM(110, 7) = 1: EM(110, 8) = 2: EM(110, 9) = 1: EM(110, 10) = 2: EM(110, 11) = 1: EM(110, 12) = 2: EM(110, 13) = 354 '2010년
EM(111, 1) = 2: EM(111, 2) = 1: EM(111, 3) = 2: EM(111, 4) = 2: EM(111, 5) = 1: EM(111, 6) = 2: EM(111, 7) = 1: EM(111, 8) = 1: EM(111, 9) = 2: EM(111, 10) = 1: EM(111, 11) = 2: EM(111, 12) = 1: EM(111, 13) = 354 '2011년
EM(112, 1) = 2: EM(112, 2) = 1: EM(112, 3) = 2: EM(112, 4) = 5: EM(112, 5) = 2: EM(112, 6) = 1: EM(112, 7) = 2: EM(112, 8) = 1: EM(112, 9) = 2: EM(112, 10) = 1: EM(112, 11) = 2: EM(112, 12) = 1: EM(112, 13) = 384 '2012년
EM(113, 1) = 2: EM(113, 2) = 1: EM(113, 3) = 2: EM(113, 4) = 2: EM(113, 5) = 1: EM(113, 6) = 2: EM(113, 7) = 1: EM(113, 8) = 2: EM(113, 9) = 1: EM(113, 10) = 2: EM(113, 11) = 1: EM(113, 12) = 2: EM(113, 13) = 355 '2013년
EM(114, 1) = 1: EM(114, 2) = 2: EM(114, 3) = 1: EM(114, 4) = 2: EM(114, 5) = 1: EM(114, 6) = 2: EM(114, 7) = 1: EM(114, 8) = 2: EM(114, 9) = 5: EM(114, 10) = 2: EM(114, 11) = 1: EM(114, 12) = 2: EM(114, 13) = 384 '2014년
EM(115, 1) = 1: EM(115, 2) = 2: EM(115, 3) = 1: EM(115, 4) = 1: EM(115, 5) = 2: EM(115, 6) = 1: EM(115, 7) = 2: EM(115, 8) = 2: EM(115, 9) = 2: EM(115, 10) = 1: EM(115, 11) = 2: EM(115, 12) = 1: EM(115, 13) = 354 '2015년
EM(116, 1) = 2: EM(116, 2) = 1: EM(116, 3) = 2: EM(116, 4) = 1: EM(116, 5) = 1: EM(116, 6) = 2: EM(116, 7) = 1: EM(116, 8) = 2: EM(116, 9) = 2: EM(116, 10) = 1: EM(116, 11) = 2: EM(116, 12) = 2: EM(116, 13) = 355 '2016년
EM(117, 1) = 1: EM(117, 2) = 2: EM(117, 3) = 1: EM(117, 4) = 2: EM(117, 5) = 1: EM(117, 6) = 4: EM(117, 7) = 1: EM(117, 8) = 2: EM(117, 9) = 1: EM(117, 10) = 2: EM(117, 11) = 2: EM(117, 12) = 2: EM(117, 13) = 385 '2017년
EM(118, 1) = 1: EM(118, 2) = 2: EM(118, 3) = 1: EM(118, 4) = 2: EM(118, 5) = 1: EM(118, 6) = 1: EM(118, 7) = 2: EM(118, 8) = 1: EM(118, 9) = 2: EM(118, 10) = 1: EM(118, 11) = 2: EM(118, 12) = 2: EM(118, 13) = 354 '2018년
EM(119, 1) = 1: EM(119, 2) = 2: EM(119, 3) = 2: EM(119, 4) = 1: EM(119, 5) = 2: EM(119, 6) = 1: EM(119, 7) = 1: EM(119, 8) = 2: EM(119, 9) = 1: EM(119, 10) = 1: EM(119, 11) = 2: EM(119, 12) = 2: EM(119, 13) = 354 '2019년
EM(120, 1) = 1: EM(120, 2) = 2: EM(120, 3) = 2: EM(120, 4) = 5: EM(120, 5) = 2: EM(120, 6) = 1: EM(120, 7) = 1: EM(120, 8) = 2: EM(120, 9) = 1: EM(120, 10) = 2: EM(120, 11) = 1: EM(120, 12) = 2: EM(120, 13) = 384 '2020년
EM(121, 1) = 1: EM(121, 2) = 2: EM(121, 3) = 2: EM(121, 4) = 1: EM(121, 5) = 2: EM(121, 6) = 1: EM(121, 7) = 2: EM(121, 8) = 1: EM(121, 9) = 2: EM(121, 10) = 1: EM(121, 11) = 2: EM(121, 12) = 1: EM(121, 13) = 354 '2021년
EM(122, 1) = 2: EM(122, 2) = 1: EM(122, 3) = 2: EM(122, 4) = 1: EM(122, 5) = 2: EM(122, 6) = 2: EM(122, 7) = 1: EM(122, 8) = 2: EM(122, 9) = 1: EM(122, 10) = 2: EM(122, 11) = 1: EM(122, 12) = 2: EM(122, 13) = 355 '2022년
EM(123, 1) = 1: EM(123, 2) = 5: EM(123, 3) = 2: EM(123, 4) = 1: EM(123, 5) = 2: EM(123, 6) = 1: EM(123, 7) = 2: EM(123, 8) = 2: EM(123, 9) = 1: EM(123, 10) = 2: EM(123, 11) = 1: EM(123, 12) = 2: EM(123, 13) = 384 '2023년
EM(124, 1) = 1: EM(124, 2) = 2: EM(124, 3) = 1: EM(124, 4) = 1: EM(124, 5) = 2: EM(124, 6) = 1: EM(124, 7) = 2: EM(124, 8) = 2: EM(124, 9) = 1: EM(124, 10) = 2: EM(124, 11) = 2: EM(124, 12) = 1: EM(124, 13) = 354 '2024년
EM(125, 1) = 2: EM(125, 2) = 1: EM(125, 3) = 2: EM(125, 4) = 1: EM(125, 5) = 1: EM(125, 6) = 5: EM(125, 7) = 2: EM(125, 8) = 1: EM(125, 9) = 2: EM(125, 10) = 2: EM(125, 11) = 2: EM(125, 12) = 1: EM(125, 13) = 384 '2025년
EM(126, 1) = 2: EM(126, 2) = 1: EM(126, 3) = 2: EM(126, 4) = 1: EM(126, 5) = 1: EM(126, 6) = 2: EM(126, 7) = 1: EM(126, 8) = 2: EM(126, 9) = 2: EM(126, 10) = 1: EM(126, 11) = 2: EM(126, 12) = 2: EM(126, 13) = 355 '2026년
EM(127, 1) = 2: EM(127, 2) = 2: EM(127, 3) = 1: EM(127, 4) = 2: EM(127, 5) = 1: EM(127, 6) = 1: EM(127, 7) = 2: EM(127, 8) = 1: EM(127, 9) = 1: EM(127, 10) = 2: EM(127, 11) = 2: EM(127, 12) = 1: EM(127, 13) = 354 '2027년
EM(128, 1) = 2: EM(128, 2) = 2: EM(128, 3) = 1: EM(128, 4) = 2: EM(128, 5) = 1: EM(128, 6) = 2: EM(128, 7) = 1: EM(128, 8) = 2: EM(128, 9) = 1: EM(128, 10) = 1: EM(128, 11) = 2: EM(128, 12) = 1: EM(128, 13) = 354 '2028년
EM(129, 1) = 2: EM(129, 2) = 2: EM(129, 3) = 2: EM(129, 4) = 1: EM(129, 5) = 5: EM(129, 6) = 1: EM(129, 7) = 2: EM(129, 8) = 1: EM(129, 9) = 1: EM(129, 10) = 2: EM(129, 11) = 2: EM(129, 12) = 1: EM(129, 13) = 384 '2029년
EM(130, 1) = 2: EM(130, 2) = 2: EM(130, 3) = 1: EM(130, 4) = 2: EM(130, 5) = 2: EM(130, 6) = 1: EM(130, 7) = 2: EM(130, 8) = 1: EM(130, 9) = 2: EM(130, 10) = 1: EM(130, 11) = 2: EM(130, 12) = 1: EM(130, 13) = 355 '2030년
End Sub
Function LunToSun(LY As Integer, LM As Integer, LD As Integer, LA As Boolean)
On Error GoTo ErrorLun
Dim Y As Integer
Dim T As Long, Y1 As Long, Y2 As Long, i As Integer, SY As Single, SM, SD, SW As Integer
Y = LY - 1900
Call CalenderData
T = LD + 49 ' 기준해인 1901년은 음력 1월 1일이 양력보다 49일 늦다
For i = 1 To Y - 1 ' 전해까지의 음력일수를 구한다
T = T + EM(i, 13)
Next i
For i = 1 To LM - 1 '전월까지의 음력일수를 계산한다
T = T + VM(EM(Y, i))
Next i
If LA = True And EM(Y, LM) < 3 Then '윤달이 맞는지 확인한다
MsgBox "이 달은 윤달이 아닙니다."
CY = 0: CM = 0: CD = 0
Exit Function
End If
If LA = True Then '윤달인 경우 윤달 일수를 계산한다
If EM(Y, LM) = 3 Or EM(Y, LM) = 4 Then
T = T + 29
Else
T = T + 30
End If
End If
' 양력이 4년에 한번씩 윤년이 있으므로 계산할 음력해까지
' 몇번의 윤년이 있는가 알기위해 음력의 누적일수를 양력 4년 동안의 일수로 나눈 몫을 구한다.
Y1 = Int(T / 1461)
T = T - 1461 * Y1
Y2 = Int(T / 365)
T = T - 365 * Y2
SY = 4 * Y1 + Y2 + 1
If SY = 4 * Int(SY / 4) And T > 59 Then '그 해가 윤년이고 2월 이후인 경우 SW=1
SW = 1
Else
SW = 0
End If
SM = 1
Do While (T > MT(SM) + SW) '남은 음력일수가 양력의 누적월수합보다 크지 않을 때까지 계산하여 양력월을 산출
SM = SM + 1
Loop
SD = T - MT(SM - 1) - SW '양력날짜를 계산하기 위해 남은 일수에서 양력월의 전달까지의 일수합과 윤년인 경우 1를 더 뺀다
If SY = 4 * Int(SY / 4) And T = 60 Then '윤년이고 2월 마지막 날인 경우
SD = 29
End If
CY = SY + 1900: CM = SM: CD = SD
LunToSun = CY & "/" & CM & "/" & CD
Exit Function
ErrorLun:
Exit Function
End Function
Function SunToLun(SY As Integer, SM As Long, SD As Long)
On Error GoTo ErrorSun
'양력날짜를 음력날짜로 바꾼다
Dim T As Long
Dim LY As Single
Dim LM As Integer
Dim LD As Integer
Dim Y As Long
Y = SY - 1900
Call CalenderData '음력 데이타를 불러온다
'양력날짜를 합산한다
T = 365 * (Y - 1) + MT(SM - 1) + SD + Int(Y / 4)
If SY = 4 * Int(Y / 4) And 30 * SM + SD < 90 Then
T = T - 1
End If
T = T - 49 '2001년은 음력이 양력보다 49일 늦으므로 1월 1일을 맞추기 위래 49를 뺀다
LY = 1
'음력해를 찾는다
Do While (T > EM(LY, 13))
T = T - EM(LY, 13)
LY = LY + 1
Loop
'음력월을 찾는다
LM = 1
Do While (T > VM(EM(LY, LM)))
T = T - VM(EM(LY, LM))
LM = LM + 1
Loop
LD = T
CY = LY + 1900: CM = LM: CD = LD
'윤달인지 검사
If (EM(LY, LM) = 3 Or EM(LY, LM) = 4) And T > 29 Then
CD = T - 29: CA = True
ElseIf (EM(LY, LM) = 5 Or EM(LY, LM) = 6) And T > 30 Then
CD = T - 30: CA = True
Else CA = False
End If
If CA = True Then '윤달인경우 윤달을 표시하기 위한 조건문
SunToLun = CY & "/" & "윤" & CM & "/" & CD
Else
SunToLun = CY & "/" & CM & "/" & CD
End If
Exit Function
ErrorSun:
Exit Function
End Function