回覆列表
  • 1 # 使用者5007521561936

    Function LongYear(Y) As Boolean "已知年返回是否潤年

    If (Y Mod 4 = 0 Or Y Mod 400 = 0) And Y Mod 100 0 Then

    LongYear=True

    Else

    LongYear=False

    End If

    End Function

    Function MonthDayCount(Y,M) "已知年月返回月天數

    Select Case Month

    Case 4,6,9,11

    MonthDayCount=30

    Case 2

    MonthDayCount=IIF(LongYear(Y)=True,29,28)

    Case Else

    MonthDayCount=31

    End Select

    End Function

    Function Season(M)"已知月返回季節

    Select Case Month

    Case 3,4,5

    Season="春"

    Case 6,7,8

    Season="夏"

    Case 9,10,11

    Season="秋"

    Case Else

    Reason="冬"

    End Select

    End Function

  • 中秋節和大豐收的關聯?
  • 怎樣才能讓衣服有香味?