Dates can be compared (for example, ), and can be used with add or subtract (for example, ). The difference between two dates can be determined with . These operations work with both Gregorian and Julian calendar dates, but is nil if the two dates use different calendars.