<%

function weekFunc(today)
 
     '//-------1년 52주중 오늘은 몇번째 주인가?--------------------//
     wcountYear = datepart("ww", today)

    

    '날짜의 유효성 검사
     if isDate(today) = false then
     weekFunc = "유효한 날짜가 아닙니다."
     end if

    '//-------이번달중 오늘은 몇번째 주인가?----------------------//
    '이번달의 첫번째일
    firstdate = year(today) & "-" & month(today) & "-01"
    wcountMonth = datepart("ww", today) - datepart("ww", firstdate) + 1


     '리턴값
     weekFunc = "오늘은 1년중 " & wcountYear & "주 째이며 이번달 중 " & wcountMonth & "주 째입니다. "

end function


Response.Write weekFunc(date())

%>

2008/02/21 15:04 2008/02/21 15:04

Trackback Address :: https://youngsam.net/trackback/119