음력지원,휴일지원 (허접함)
오래전에 만든건에 다시 보면서 이곳에 공유하려구요 ^^
파일 첨부가 안 되네요
아래 부분은 소스입니다
텍스트만 있는 html이어서 디자인 붙이기가 쉽습니다
많은 이용하세요 ^^

[출처 : http://taeyo.net]

<%
'#################
'음력지원 되는 달력
'텍스트 중심의 소스로 수정해서 사용하세요
%>
<% Option Explicit %>
<%
' 처리가능 기간  1841 - 2043년
'음력날짜(인크루드해서 사용하세요)
dim kk,j

'1841
kk = "1,2,4,1,1,2,1,2,1,2,2,1,"
kk = kk & "2,2,1,2,1,1,2,1,2,1,2,1,"
kk = kk & "2,2,2,1,2,1,4,1,2,1,2,1,"
kk = kk & "2,2,1,2,1,2,1,2,1,2,1,2,"
kk = kk & "1,2,1,2,2,1,2,1,2,1,2,1,"
kk = kk & "2,1,2,1,5,2,1,2,2,1,2,1,"
kk = kk & "2,1,1,2,1,2,1,2,2,2,1,2,"
kk = kk & "1,2,1,1,2,1,2,1,2,2,2,1,"
kk = kk & "2,1,2,3,2,1,2,1,2,1,2,2,"
kk = kk & "2,1,2,1,1,2,1,1,2,2,1,2,"
'1851
kk = kk & "2,2,1,2,1,1,2,1,2,1,5,2,"
kk = kk & "2,1,2,2,1,1,2,1,2,1,1,2,"
kk = kk & "2,1,2,2,1,2,1,2,1,2,1,2,"
kk = kk & "1,2,1,2,1,2,5,2,1,2,1,2,"
kk = kk & "1,1,2,1,2,2,1,2,2,1,2,1,"
kk = kk & "2,1,1,2,1,2,1,2,2,2,1,2,"
kk = kk & "1,2,1,1,5,2,1,2,1,2,2,2,"
kk = kk & "1,2,1,1,2,1,1,2,2,1,2,2,"
kk = kk & "2,1,2,1,1,2,1,1,2,1,2,2,"
kk = kk & "2,1,6,1,1,2,1,1,2,1,2,2,"
'1861
kk = kk & "1,2,2,1,2,1,2,1,2,1,1,2,"
kk = kk & "2,1,2,1,2,2,1,2,2,3,1,2,"
kk = kk & "1,2,2,1,2,1,2,2,1,2,1,2,"
kk = kk & "1,1,2,1,2,1,2,2,1,2,2,1,"
kk = kk & "2,1,1,2,4,1,2,2,1,2,2,1,"
kk = kk & "2,1,1,2,1,1,2,2,1,2,2,2,"
kk = kk & "1,2,1,1,2,1,1,2,1,2,2,2,"
kk = kk & "1,2,2,3,2,1,1,2,1,2,2,1,"
kk = kk & "2,2,2,1,1,2,1,1,2,1,2,1,"
kk = kk & "2,2,2,1,2,1,2,1,1,5,2,1,"
'1871
kk = kk & "2,2,1,2,2,1,2,1,2,1,1,2,"
kk = kk & "1,2,1,2,2,1,2,1,2,2,1,2,"
kk = kk & "1,1,2,1,2,4,2,1,2,2,1,2,"
kk = kk & "1,1,2,1,2,1,2,1,2,2,2,1,"
kk = kk & "2,1,1,2,1,1,2,1,2,2,2,1,"
kk = kk & "2,2,1,1,5,1,2,1,2,2,1,2,"
kk = kk & "2,2,1,1,2,1,1,2,1,2,1,2,"
kk = kk & "2,2,1,2,1,2,1,1,2,1,2,1,"
kk = kk & "2,2,4,2,1,2,1,1,2,1,2,1,"
kk = kk & "2,1,2,2,1,2,2,1,2,1,1,2,"
'1881
kk = kk & "1,2,1,2,1,2,5,2,2,1,2,1,"
kk = kk & "1,2,1,2,1,2,1,2,2,1,2,2,"
kk = kk & "1,1,2,1,1,2,1,2,2,2,1,2,"
kk = kk & "2,1,1,2,3,2,1,2,2,1,2,2,"
kk = kk & "2,1,1,2,1,1,2,1,2,1,2,2,"
kk = kk & "2,1,2,1,2,1,1,2,1,2,1,2,"
kk = kk & "2,2,1,5,2,1,1,2,1,2,1,2,"
kk = kk & "2,1,2,2,1,2,1,1,2,1,2,1,"
kk = kk & "2,1,2,2,1,2,1,2,1,2,1,2,"
kk = kk & "1,5,2,1,2,2,1,2,1,2,1,2,"
'1891
kk = kk & "1,2,1,2,1,2,1,2,2,1,2,2,"
kk = kk & "1,1,2,1,1,5,2,2,1,2,2,2,"
kk = kk & "1,1,2,1,1,2,1,2,1,2,2,2,"
kk = kk & "1,2,1,2,1,1,2,1,2,1,2,2,"
kk = kk & "2,1,2,1,5,1,2,1,2,1,2,1,"
kk = kk & "2,2,2,1,2,1,1,2,1,2,1,2,"
kk = kk & "1,2,2,1,2,1,2,1,2,1,2,1,"
kk = kk & "2,1,5,2,2,1,2,1,2,1,2,1,"
kk = kk & "2,1,2,1,2,1,2,2,1,2,1,2,"
kk = kk & "1,2,1,1,2,1,2,5,2,2,1,2,"
'1901
kk = kk & "1,2,1,1,2,1,2,1,2,2,2,1,"
kk = kk & "2,1,2,1,1,2,1,2,1,2,2,2,"
kk = kk & "1,2,1,2,3,2,1,1,2,2,1,2,"
kk = kk & "2,2,1,2,1,1,2,1,1,2,2,1,"
kk = kk & "2,2,1,2,2,1,1,2,1,2,1,2,"
kk = kk & "1,2,2,4,1,2,1,2,1,2,1,2,"
kk = kk & "1,2,1,2,1,2,2,1,2,1,2,1,"
kk = kk & "2,1,1,2,2,1,2,1,2,2,1,2,"
kk = kk & "1,5,1,2,1,2,1,2,2,2,1,2,"
kk = kk & "1,2,1,1,2,1,2,1,2,2,2,1,"
'1911
kk = kk & "2,1,2,1,1,5,1,2,2,1,2,2,"
kk = kk & "2,1,2,1,1,2,1,1,2,2,1,2,"
kk = kk & "2,2,1,2,1,1,2,1,1,2,1,2,"
kk = kk & "2,2,1,2,5,1,2,1,2,1,1,2,"
kk = kk & "2,1,2,2,1,2,1,2,1,2,1,2,"
kk = kk & "1,2,1,2,1,2,2,1,2,1,2,1,"
kk = kk & "2,3,2,1,2,2,1,2,2,1,2,1,"
kk = kk & "2,1,1,2,1,2,1,2,2,2,1,2,"
kk = kk & "1,2,1,1,2,1,5,2,2,1,2,2,"
kk = kk & "1,2,1,1,2,1,1,2,2,1,2,2,"
'1921
kk = kk & "2,1,2,1,1,2,1,1,2,1,2,2,"
kk = kk & "2,1,2,2,3,2,1,1,2,1,2,2,"
kk = kk & "1,2,2,1,2,1,2,1,2,1,1,2,"
kk = kk & "2,1,2,1,2,2,1,2,1,2,1,1,"
kk = kk & "2,1,2,5,2,1,2,2,1,2,1,2,"
kk = kk & "1,1,2,1,2,1,2,2,1,2,2,1,"
kk = kk & "2,1,1,2,1,2,1,2,2,1,2,2,"
kk = kk & "1,5,1,2,1,1,2,2,1,2,2,2,"
kk = kk & "1,2,1,1,2,1,1,2,1,2,2,2,"
kk = kk & "1,2,2,1,1,5,1,2,1,2,2,1,"
'1931
kk = kk & "2,2,2,1,1,2,1,1,2,1,2,1,"
kk = kk & "2,2,2,1,2,1,2,1,1,2,1,2,"
kk = kk & "1,2,2,1,6,1,2,1,2,1,1,2,"
kk = kk & "1,2,1,2,2,1,2,2,1,2,1,2,"
kk = kk & "1,1,2,1,2,1,2,2,1,2,2,1,"
kk = kk & "2,1,4,1,2,1,2,1,2,2,2,1,"
kk = kk & "2,1,1,2,1,1,2,1,2,2,2,1,"
kk = kk & "2,2,1,1,2,1,4,1,2,2,1,2,"
kk = kk & "2,2,1,1,2,1,1,2,1,2,1,2,"
kk = kk & "2,2,1,2,1,2,1,1,2,1,2,1,"
'1941
kk = kk & "2,2,1,2,2,4,1,1,2,1,2,1,"
kk = kk & "2,1,2,2,1,2,2,1,2,1,1,2,"
kk = kk & "1,2,1,2,1,2,2,1,2,2,1,2,"
kk = kk & "1,1,2,4,1,2,1,2,2,1,2,2,"
kk = kk & "1,1,2,1,1,2,1,2,2,2,1,2,"
kk = kk & "2,1,1,2,1,1,2,1,2,2,1,2,"
kk = kk & "2,5,1,2,1,1,2,1,2,1,2,2,"
kk = kk & "2,1,2,1,2,1,1,2,1,2,1,2,"
kk = kk & "2,2,1,2,1,2,3,2,1,2,1,2,"
kk = kk & "2,1,2,2,1,2,1,1,2,1,2,1,"
'1951
kk = kk & "2,1,2,2,1,2,1,2,1,2,1,2,"
kk = kk & "1,2,1,2,4,2,1,2,1,2,1,2,"
kk = kk & "1,2,1,1,2,2,1,2,2,1,2,2,"
kk = kk & "1,1,2,1,1,2,1,2,2,1,2,2,"
kk = kk & "2,1,4,1,1,2,1,2,1,2,2,2,"
kk = kk & "1,2,1,2,1,1,2,1,2,1,2,2,"
kk = kk & "2,1,2,1,2,1,1,5,2,1,2,2,"
kk = kk & "1,2,2,1,2,1,1,2,1,2,1,2,"
kk = kk & "1,2,2,1,2,1,2,1,2,1,2,1,"
kk = kk & "2,1,2,1,2,5,2,1,2,1,2,1,"
'1961
kk = kk & "2,1,2,1,2,1,2,2,1,2,1,2,"
kk = kk & "1,2,1,1,2,1,2,2,1,2,2,1,"
kk = kk & "2,1,2,3,2,1,2,1,2,2,2,1,"
kk = kk & "2,1,2,1,1,2,1,2,1,2,2,2,"
kk = kk & "1,2,1,2,1,1,2,1,1,2,2,1,"
kk = kk & "2,2,5,2,1,1,2,1,1,2,2,1,"
kk = kk & "2,2,1,2,2,1,1,2,1,2,1,2,"
kk = kk & "1,2,2,1,2,1,5,2,1,2,1,2,"
kk = kk & "1,2,1,2,1,2,2,1,2,1,2,1,"
kk = kk & "2,1,1,2,2,1,2,1,2,2,1,2,"
'1971
kk = kk & "1,2,1,1,5,2,1,2,2,2,1,2,"
kk = kk & "1,2,1,1,2,1,2,1,2,2,2,1,"
kk = kk & "2,1,2,1,1,2,1,1,2,2,2,1,"
kk = kk & "2,2,1,5,1,2,1,1,2,2,1,2,"
kk = kk & "2,2,1,2,1,1,2,1,1,2,1,2,"
kk = kk & "2,2,1,2,1,2,1,5,2,1,1,2,"
kk = kk & "2,1,2,2,1,2,1,2,1,2,1,1,"
kk = kk & "2,2,1,2,1,2,2,1,2,1,2,1,"
kk = kk & "2,1,1,2,1,6,1,2,2,1,2,1,"
kk = kk & "2,1,1,2,1,2,1,2,2,1,2,2,"
'1981
kk = kk & "1,2,1,1,2,1,1,2,2,1,2,2,"
kk = kk & "2,1,2,3,2,1,1,2,2,1,2,2,"
kk = kk & "2,1,2,1,1,2,1,1,2,1,2,2,"
kk = kk & "2,1,2,2,1,1,2,1,1,5,2,2,"
kk = kk & "1,2,2,1,2,1,2,1,1,2,1,2,"
kk = kk & "1,2,2,1,2,2,1,2,1,2,1,1,"
kk = kk & "2,1,2,2,1,5,2,2,1,2,1,2,"
kk = kk & "1,1,2,1,2,1,2,2,1,2,2,1,"
kk = kk & "2,1,1,2,1,2,1,2,2,1,2,2,"
kk = kk & "1,2,1,1,5,1,2,1,2,2,2,2,"
'1991
kk = kk & "1,2,1,1,2,1,1,2,1,2,2,2,"
kk = kk & "1,2,2,1,1,2,1,1,2,1,2,2,"
kk = kk & "1,2,5,2,1,2,1,1,2,1,2,1,"
kk = kk & "2,2,2,1,2,1,2,1,1,2,1,2,"
kk = kk & "1,2,2,1,2,2,1,5,2,1,1,2,"
kk = kk & "1,2,1,2,2,1,2,1,2,2,1,2,"
kk = kk & "1,1,2,1,2,1,2,2,1,2,2,1,"
kk = kk & "2,1,1,2,3,2,2,1,2,2,2,1,"
kk = kk & "2,1,1,2,1,1,2,1,2,2,2,1,"
kk = kk & "2,2,1,1,2,1,1,2,1,2,2,1,"
'2001
kk = kk & "2,2,2,3,2,1,1,2,1,2,1,2,"
kk = kk & "2,2,1,2,1,2,1,1,2,1,2,1,"
kk = kk & "2,2,1,2,2,1,2,1,1,2,1,2,"
kk = kk & "1,5,2,2,1,2,1,2,2,1,1,2,"
kk = kk & "1,2,1,2,1,2,2,1,2,2,1,2,"
kk = kk & "1,1,2,1,2,1,5,2,2,1,2,2,"
kk = kk & "1,1,2,1,1,2,1,2,2,2,1,2,"
kk = kk & "2,1,1,2,1,1,2,1,2,2,1,2,"
kk = kk & "2,2,1,1,5,1,2,1,2,1,2,2,"
kk = kk & "2,1,2,1,2,1,1,2,1,2,1,2,"
'2011
kk = kk & "2,1,2,2,1,2,1,1,2,1,2,1,"
kk = kk & "2,1,6,2,1,2,1,1,2,1,2,1,"
kk = kk & "2,1,2,2,1,2,1,2,1,2,1,2,"
kk = kk & "1,2,1,2,1,2,1,2,5,2,1,2,"
kk = kk & "1,2,1,1,2,1,2,2,2,1,2,2,"
kk = kk & "1,1,2,1,1,2,1,2,2,1,2,2,"
kk = kk & "2,1,1,2,3,2,1,2,1,2,2,2,"
kk = kk & "1,2,1,2,1,1,2,1,2,1,2,2,"
kk = kk & "2,1,2,1,2,1,1,2,1,2,1,2,"
kk = kk & "2,1,2,5,2,1,1,2,1,2,1,2,"
'2021
kk = kk & "1,2,2,1,2,1,2,1,2,1,2,1,"
kk = kk & "2,1,2,1,2,2,1,2,1,2,1,2,"
kk = kk & "1,5,2,1,2,1,2,2,1,2,1,2,"
kk = kk & "1,2,1,1,2,1,2,2,1,2,2,1,"
kk = kk & "2,1,2,1,1,5,2,1,2,2,2,1,"
kk = kk & "2,1,2,1,1,2,1,2,1,2,2,2,"
kk = kk & "1,2,1,2,1,1,2,1,1,2,2,2,"
kk = kk & "1,2,2,1,5,1,2,1,1,2,2,1,"
kk = kk & "2,2,1,2,2,1,1,2,1,1,2,2,"
kk = kk & "1,2,1,2,2,1,2,1,2,1,2,1,"
'2031
kk = kk & "2,1,5,2,1,2,2,1,2,1,2,1,"
kk = kk & "2,1,1,2,1,2,2,1,2,2,1,2,"
kk = kk & "1,2,1,1,2,1,5,2,2,2,1,2,"
kk = kk & "1,2,1,1,2,1,2,1,2,2,2,1,"
kk = kk & "2,1,2,1,1,2,1,1,2,2,1,2,"
kk = kk & "2,2,1,2,1,4,1,1,2,1,2,2,"
kk = kk & "2,2,1,2,1,1,2,1,1,2,1,2,"
kk = kk & "2,2,1,2,1,2,1,2,1,1,2,1,"
kk = kk & "2,2,1,2,5,2,1,2,1,2,1,1,"
kk = kk & "2,1,2,2,1,2,2,1,2,1,2,1,"
'2041
kk = kk & "2,1,1,2,1,2,2,1,2,2,1,2,"
kk = kk & "1,5,1,2,1,2,1,2,2,2,1,2,"
kk = kk & "1,2,1,1,2,1,1,2,2,1,2,2"

dim week,md
week = "일,월,화,수,목,금,토"
md = "31,0,31,30,31,30,31,31,30,31,30,31"
dim akk,aweek,amd
akk = split(kk, ",")
aweek = split(week, ",")
amd = split(md, ",")

Dim sYEAR, sMONTH, sDAY    ' 양력일자를 저장할 변수
Dim lYEAR, lMONTH, lDAY, lGU    ' 음력일자를 저장할 변수
Dim YoonYN        ' 윤년 여부를 저장하는 변수 1=윤년, 0=평년

Function siYoon(yy)        ' 윤년인지를 판단하는 함수
    if yy mod 4 <> 0 then
        YoonYN = 0
    elseif yy mod 100 <> 0 then
        YoonYN = 1
    elseif yy mod 400 <> 0 then
        YoonYN = 0
    else
        YoonYN = 1
    end if
End Function

Function Sol2Lun(y, m, d)
    dim dt()        ' 매년의 음력일수를 저장할 배열 변수
    dim td        ' 음력일을 계산하기 위해 양력일과의 차이를 저장할 변수
    dim td1        ' 1840년까지의 날수
    dim td2        ' 현재까지의 날수
    dim sy, sm, sd    ' 전해온 양력 인자값을 저장할 년, 월, 일 임시변수
    dim mm        ' 임시변수
    dim ly, lm, ld    ' 계산된 음력 년, 월, 일을 저장할 변수
    dim yoon        ' 현재월이 윤달임을 표시

    td1 = 672069     ' 672069 = 1840 * 365 + 1840/4 - 1840/100 +1840/400 + 23  //1840년까지 날수
    sy = y
    sm = m
    sd = d
   
    siYoon(sy)        ' 윤달여부를 체크
    if YoonYn = 1 then
        amd(1) = 29
    else
        amd(1) = 28
    end if

    ' 1841년부터 작년까지의 날수
    td2 = (sy - 1) * 365 + int((sy - 1)/4) - int((sy - 1)/100) + int((sy - 1)/400)

    ' 전월까지의 날수를 더함
    for i = 0 to sm - 2
        td2 = td2 + int(amd(i))
    next

    ' 현재일까지의 날수를 더함
    td2 = td2 + sd

    ' 양력현재일과 음력 1840년까지의 날수의 차이
    td = td2 - td1 + 1

    ' 1841년부터 음력날수를 계산
    redim dt(sy-1841)
    for i = 0 to sy - 1841
        dt(i) = 0
        for j = 0 to 11
            select case int(akk(i*12 + j))
                case 1 : mm = 29
                case 2 : mm = 30
                case 3 : mm = 58    ' 29 + 29
                case 4 : mm = 59    ' 29 + 30
                case 5 : mm = 59    ' 30 + 29
                case 6 : mm = 60    ' 30 + 30
            end select
            dt(i) = dt(i) + mm
        next
    next
   
    ' 1840년 이후의 년도를 계산 - 현재까지의 일수에서 위에서 계산된 1841년부터의 매년 음력일수를 빼가면수 년도를 계산
    ly = 0
    do while(td > dt(ly))
        td = td - dt(ly)
        ly = ly + 1
    loop

    lm = 0
    yoon = "N"            ' 현재월이 윤달임을 표시할 변수 - 기본값 평달
    do while(1)
        if int(akk(ly*12 + lm)) <= 2 then
            mm = int(akk(ly*12 + lm)) + 28
            if td > mm then
                td = td - mm
                lm = lm + 1
            else
                exit do
            end if
        else        ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
            select case int(akk(ly*12 + lm))
                case 3 :
                    m1 = 29
                    m2 = 29
                case 4 :
                    m1 = 29
                    m2 = 30
                case 5 :
                    m1 = 30
                    m2 = 29
                case 6 :
                    m1 = 30
                    m2 = 30
            end select

            if td > m1 then
                td = td - m1
                if td > m2 then
                    td = td - m2
                    lm = lm + 1
                else
                    yoon = "Y"
                end if
            else
                exit do
            end if
        end if
    loop

    ly = ly + 1841
    lm = lm + 1
    ld = td

    lYEAR = ly
    lMONTH = lm
    lDAY = ld
    lGU = yoon
End Function


Function Lun2Sol(y, m, d, g)
    dim ly, lm, ld, lg    ' 전해온 음력 인자값을 저장할 년, 월, 일, 윤달여부 임시변수
    dim sy, sm, sd    ' 계산된 양력 년, 월, 일을 저장할 변수
    dim y1, m1, i, j, y2, y3    ' 임시변수

    ly = y
    lm = m
    ld = d
    lg = g

    y1 = ly - 1841
    m1 = lm - 1
    leap = 0

    if int(akk(y1*12 + m1)) > 2 then
        siYoon(ly)
        leap = YoonYN
    end if

    if leap = 1 then
        select case int(akk(y1*12 + m1))
            case 3 : mm = 29
            case 4 : mm = 30
            case 5 : mm = 29
            case 6 : mm = 30
        end select
    else
        select case int(akk(y1*12 + m1))
            case 1 : mm = 29
            case 2 : mm = 30
            case 3 : mm = 29
            case 4 : mm = 29
            case 5 : mm = 30
            case 6 : mm = 30
        end select
    end if

    td = 0
    for i = 0 to y1 - 1
        for j = 0 to 11
            select case int(akk(i*12 + j))
                case 1 : td = td + 29
                case 2 : td = td + 30
                case 3 : td = td + 58
                case 4 : td = td + 59
                case 5 : td = td + 59
                case 6 : td = td + 60
            end select
        next
    next

    for j = 0 to m1 - 1
        select case int(akk(y1*12 + j))
            case 1 : td = td + 29
            case 2 : td = td + 30
            case 3 : td = td + 58
            case 4 : td = td + 59
            case 5 : td = td + 59
            case 6 : td = td + 60
        end select
    next

    if leap = 1 then
        select case int(akk(y1*12 + m1))
            case 3 : mm = 29
            case 4 : mm = 29
            case 5 : mm = 30
            case 6 : mm = 30
        end select
    end if

    td = td + ld + 22

    if lg = "Y" then
        select case int(akk(y1*12 + m1))
            case 3 : td = td + 29
            case 4 : td = td + 30
            case 5 : td = td + 29
            case 6 : td = td + 30
        end select
    end if

    y1 = 1840
    do while(true)
        y1 = y1 + 1
        siYoon(y1)
        leap = YoonYN

        if leap = 1 then
            y2 = 366
        else
            y2 = 365
        end if

        if td <= y2 then
            exit do
        end if
        td = td - y2
    loop

    sy = y1
    amd(1) = y2 - 337
    m1 = 0
    do while(true)
        m1 = m1 + 1
        if td <= int(amd(m1-1)) then
            exit do
        end if
        td = td - int(amd(m1-1))
    loop

    sm = m1
    sd = td
    y3 = sy
    td = y3 * 365 + int(y3/4) - int(y3/100) + int(y3/400)
    for i = 0 to sm - 1
        td = td + int(amd(i))
    next

    td = td + sd

    sYEAR = y3
    sMONTH = sm
    sDAY = sd
End Function

%>
<!--실제 소스 부분-->
<%
dim todayDate,todayDay,todayMonth,todayYear,goMonth,nDay,nMonth,nYear
dim toDate,sDate,dtDate,prevMonth,nextMonth
dim ddDate,inNum,i,lunday,dayColor,bgcolor,endate
todayDate = Now()
todayDay = Day(todayDate)
todayMonth = Month(todayDate)
todayYear = Year(todayDate)

goMonth = Request("goMonth")
  nDay = Day(goMonth)
  nMonth = Month(goMonth)
  nYear = Year(goMonth)
if goMonth = "" then
  nDay = todayDay
  nMonth = todayMonth
  nYear = todayYear
end if
toDate = DateSerial(todayYear, todayMonth, todayDay)
sDate = DateSerial(nYear, nMonth, nDay)
dtDate = DateSerial(nYear, nMonth, 1)
prevMonth = DateAdd("m",-1,dtDate)
nextMonth = DateAdd("m",1,dtDate)
%>
                        <table border=0 cellpadding=0 cellspacing=0 width=350>
                          <tr>
                            <td align=right width='125'><a href="mm.asp?goMonth=<%=prevMonth%>"><font color="#999999">◀</font></a></td>
                            <td align=center style="PADDING-TOP: 2px"
                              align=center width='100'><b><font class=c><%=nYear%>년 <%=nMonth%>월</font></b></td>
                            <td align=left width='125'><a href="mm.asp?goMonth=<%=nextMonth%>"><font color="#999999">▶</font></a></td>
                          </tr>
                        </table>
            <table width="350" border="0" cellspacing="1" cellpadding="1" bgcolor="#333333">
                          <tr align="center">
                            <td height="50" width="50" bgcolor="#D6E7F7"><font color="#990000">일</font></td>
                            <td height="50" width="50" bgcolor="#D6E7F7">월</td>
                            <td height="50" width="50" bgcolor="#D6E7F7">화</td>
                            <td height="50" width="50" bgcolor="#D6E7F7">수</td>
                            <td height="50" width="50" bgcolor="#D6E7F7">목</td>
                            <td height="50" width="50" bgcolor="#D6E7F7">금</td>
                            <td height="50" width="50" bgcolor="#D6E7F7">토</td>
                          </tr>
              <tr height="50">
              <%
                      ddDate=datediff("d",Weekday(dtDate),dtDate)
                      for inNum = 1 to Weekday(dtDate) - 1
                        ddDate = Dateadd("d", 1, ddDate)
                    Response.Write "<td bgcolor=#E6E6E6 width='50' valign=top><font color=#999999>"&day(ddDate)&"</font></td>" & vbCrLf
                          next
         
                      do
              call Sol2Lun(year(dtDate), month(dtDate), day(dtDate))
              lunday =  lMONTH&"-"& lDAY
                '양력 휴일
                if Weekday(dtDate) = "1" then
                      dayColor = "#CC0000"
                            elseif month(dtDate)="1" and day(dtDate)="1" then
                      dayColor = "#CC0000"
                elseif month(dtDate)="3" and day(dtDate)="1" then
                      dayColor = "#CC0000"
                elseif month(dtDate)="4" and day(dtDate)="5" then
                      dayColor = "#CC0000"
                elseif month(dtDate)="5" and day(dtDate)="5" then
                      dayColor = "#CC0000"
                elseif month(dtDate)="6" and day(dtDate)="6" then
                      dayColor = "#CC0000"
                elseif month(dtDate)="7" and day(dtDate)="17" then
                      dayColor = "#CC0000"
                elseif month(dtDate)="8" and day(dtDate)="15" then
                      dayColor = "#CC0000"
                elseif month(dtDate)="10" and day(dtDate)="3" then
                      dayColor = "#CC0000"
                elseif month(dtDate)="12" and day(dtDate)="25" then
                      dayColor = "#CC0000"
                '음력 휴일
                elseif month(lunday)="12" and day(lunday)="30" then
                  dayColor = "#CC0000"
                elseif month(lunday)="1" and day(lunday)="1" then
                  dayColor = "#CC0000"
                elseif month(lunday)="1" and day(lunday)="2" then
                  dayColor = "#CC0000"
                        elseif month(lunday)="4" and day(lunday)="8" then
                  dayColor = "#CC0000"
                elseif month(lunday)="8" and day(lunday)="14" then
                  dayColor = "#CC0000"
                elseif month(lunday)="8" and day(lunday)="15" then
                  dayColor = "#CC0000"
                elseif month(lunday)="8" and day(lunday)="16" then
                  dayColor = "#CC0000"
                        else
                          dayColor = "#000000"
                            end if

                        if toDate=dtDate then
                          bgcolor="#FFEEAC"
                        else
                          bgcolor="#ffffff"
                        end if
         
                      Response.Write "<td valign=top bgcolor="&bgcolor&" width='50'>"
                      'Response.Write "<a href>"원하는 링크
                      Response.Write "<font color="&dayColor&">" &Day(dtDate)
                      if (day(lunday)="1" or day(lunday)="5" or day(lunday)="10" or day(lunday)="15" or day(lunday)="20" or day(lunday)="25") then
                      Response.Write "<BR><BR>"&lunday
                    end if
                    Response.Write "</font></a>"

'                      'Response.Write "이부분" & vbCrLf
                      Response.Write "</td>"
'                     
              if WeekDay(dtDate) = 7 then
                    Response.Write "</tr>"
                    Response.Write "<tr bgcolor=""#ffffff"" height='50'>"
                      end if
'                     
              dtDate = DateAdd("d", 1, dtDate)
         
                      loop until (month(dtDate)<>month(sDate) )
                  if Weekday(dtDate) <> 1 then
                    endate = dtDate
                    for inNum = Weekday(dtDate) to 7
                    Response.Write "<td bgcolor=#E6E6E6 valign=top width='50'><font color=#999999>"&day(endate)&"</font></td>"
                          endate = DateAdd("d", 1, endate)
                    next
                  end if
                      %>
                      </tr>
                        </table>

+ Recent posts