Subpackages | |
ceylon.time.internal.math |
Functions | |
gap | Source Codeshared Value[2]|[] gap<Value>(Value[2] first, Value[2] second) Returns a tuple representing an exclusive gap between two disjoint ranges of ordinal values. Values in the tuple are returned always in their natural order regardless of their original ordering in the input tuples. If input ranges are overlapping, this function will return an empty value. Examples: assert(gap([1, 2], [5, 6]) == [3, 4]); assert(gap([6, 5], [1, 2]) == [3, 4]); assert(is Empty g = gap([1, 3], [2, 4])); |
gregorianDate | Source Codeshared Date gregorianDate(Integer year, Integer|Month month, Integer day) Returns a gregorian calendar date according to the specified year, month and date values. Parameters:
|
gregorianYearMonth | Source Codeshared YearMonth gregorianYearMonth(Integer year, Integer|Month month) Returns a gregorian year and month calendar according to the specified year and month values. Parameters:
|
intersect | Source Codeshared Boolean intersect<Value>(Value start, Value end, Value otherStart, Value otherEnd) Returns if two ranges has intersection. |
overlap | Source Codeshared Value[2]|[] overlap<Value>(Value[2] first, Value[2] second) Returns the inclusive overlap between two ordinal ranges. The range of the overlap will be returned in the natural order of the values regardless of their original order in input tuples. Examples: assert(overlap([1, 3], [2, 4]) == [2, 3]); assert(overlap([4, 2], [1, 3]) == [2, 3]); assert(is Empty o = overlap([1, 2], [3, 4])); |
Classes | |
GregorianDate | Source Codeshared GregorianDate Default implementation of a gregorian calendar |
GregorianDateTime | Source Codeshared GregorianDateTime Default implementation of a gregorian calendar |
GregorianYearMonth | Source Codeshared GregorianYearMonth |
GregorianZonedDateTime | Source Codeshared GregorianZonedDateTime Default implementation of gregorian calendar thats makes use of a This means that making some operations like plusDays takes into account the result Instant generated to reapply all the rules of the current TimeZone. |
TimeOfDay | Source Codeshared TimeOfDay Basic implementation of |