abstract data types listing continued def __lt__selfotherdate )return self _julianday otherdate _julianday def __le__selfotherdate )return self _julianday <otherdate _julianday the remaining methods are to be included at this point returns the gregorian date as tuple(monthdayyeardef _togregorianself ) self _julianday / ( / year ( / ( year / month / day ( month / month / month month ( ayear ( year return monthdayyear constructing the date we begin our discussion of the implementation with the constructorwhich is shown in lines - of listing the date adt will need only single attribute to store the julian day representing the given gregorian date to convert gregorian date to julian day numberwe use the following formula where day corresponds to november bc and all operations involve integer arithmetic ( jday ( ( ( ( ( (( before attempting to convert the gregorian date to julian daywe need to verify it' valid date this is necessary since the precondition states the supplied gregorian date must be valid the isvalidgregorian(helper method is used to verify the validity of the given gregorian date this helper methodthe implementation of which is left as an exercisetests the supplied gregorian date components and returns the appropriate boolean value if valid date is supplied to the constructorit is converted to the equivalent julian day using the equation provided earlier note the statements in lines - the equation for converting gregorian date to julian day number uses integer arithmeticbut seidelmannp kenneth (ed ( explanatory supplement to the astronomical almanacpp -- university science books