compareDates

fun compareDates(dateToCompareFrom: CustomCalendar, dateToCompareTo: SimpleDate): Int(source)

Compares a CustomCalendar instance with a date represented by the given SimpleDate.

Returns a negative integer if the dateToCompareFrom is before the dateToCompareTo, zero if they are equal, and a positive integer if the dateToCompareFrom is after the dateToCompareTo.

Return

A negative integer, zero, or a positive integer as described above.

Parameters

dateToCompareFrom

The CustomCalendar instance to compare.

dateToCompareTo

The SimpleDate representing the date to compare to.


fun compareDates(dateToCompareFrom: CustomCalendar, dateToCompareTo: CustomCalendar): Int(source)

Overloaded function of above compareDates function.

Compares two CustomCalendar instances to determine their chronological order.

Returns a negative integer if dateToCompareFrom is before dateToCompareTo, zero if they are equal, and a positive integer if dateToCompareFrom is after dateToCompareTo.

Return

A negative integer, zero, or a positive integer as described above.

Parameters

dateToCompareFrom

The first date in the comparison.

dateToCompareTo

The second date, which dateToCompareFrom is compared to.


fun compareDates(simpleDate: SimpleDate, year: Int, month: Int, dayOfMonth: Int): Int(source)

Compares a SimpleDate instance with a date represented by the given year, month, and dayOfMonth.

Returns a negative integer if the SimpleDate is before the given date, zero if they are equal, and a positive integer if the SimpleDate is after the given date.

Return

A negative integer, zero, or a positive integer as described above.

Parameters

simpleDate

The SimpleDate instance to compare.

year

The year of the date to compare with.

month

The month of the date to compare with.

dayOfMonth

The day of the month of the date to compare with.