VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "JulianDate"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit

Private mOldNewYearMonth        As Long
Private mOldNewYearDay          As Long
Private mReformYear             As Long
Private mReformMonth            As Long
Private mReformDay              As Long
Private mFirstGregorianDate     As Double
Private mFirstGregorianJNumber  As Double
Private mIsCivil                As Boolean


Public Property Let OldNewYearMonth(ByVal Value As Long)
    If Value >= 1 And Value <= 12 Then
        mOldNewYearMonth = Value
    End If
End Property

Public Property Get OldNewYearMonth() As Long
    OldNewYearMonth = mOldNewYearMonth
End Property

Public Property Let OldNewYearDay(ByVal Value As Long)
    If Value >= 1 And Value <= 31 Then
        mOldNewYearDay = Value
    End If
End Property

Public Property Get OldNewYearDay() As Long
    OldNewYearDay = mOldNewYearDay
End Property

Public Property Let ReformYear(ByVal Value As Long)
   ' Check to ensure the year is within the first Gregorian epoch
   ' and equal to or later than AD 1582 -- the earliest year a
   'reform was adopted. AD 3267 would be a REALLY late adopter!
    If Value >= 1582 And Value <= 3267 Then
        mReformYear = Value
    End If
End Property

Public Property Get ReformYear() As Long
    ReformYear = mReformYear
End Property

Public Property Let ReformMonth(ByVal Value As Long)
    If Value >= 1 And Value <= 12 Then
        mReformMonth = Value
    End If
End Property

Public Property Get ReformMonth() As Long
    ReformMonth = mReformMonth
End Property

Public Property Let ReformDay(ByVal Value As Long)
    If Value >= 1 And Value <= 31 Then
        mReformDay = Value
    End If
End Property

Public Property Get ReformDay() As Long
    ReformDay = mReformDay
End Property



'
' Initialize properties for the British civil calendar
'
Private Sub Class_Initialize()
    mOldNewYearMonth = 3
    mOldNewYearDay = 25
    mReformYear = 1752
    mReformMonth = 9
    mReformDay = 14
    mFirstGregorianDate = 17520914
    mFirstGregorianJNumber = 2361221
    mIsCivil = True
End Sub
