|
真正的公农历转换类for VB(13) lYear = mvarlYear End Property Public Property Get sWeekDay() As Long sWeekDay = WeekDay(mvarDate) End Property Public Property Get sDay() As Long sDay = mvarsDay End Property Public Property Get sMonth() As Long sMonth = mvarsMonth End Property Public Property Get sYear() As Long sYear = mvarsYear End Property '//////////////////////////////////////////////////////////////////////////////////////////////////////// Public Function IsToday(y As Long, m As Long, d As Long) As Boolean If (Year(Date) = y) And _ (Month(Date) = m) And _ (Day(Date) = d) Then IsToday = True Else IsToday = False End If End Function '根据年份不同计算当年属于什么朝代 Public Function Era(y As Long) As String Dim tempStr As String If y < 1874 Then tempStr = "未知" Else If y <= 1908 Then tempStr = "清朝光绪" If y = 1874 Then tempStr = tempStr & "元年" Else tempStr = tempStr & UpNumber(CStr(y - 1874)) & "年" End If Else If y <= 1910 Then
|