pike.hubbe.net

[Top]
Calendar
Calendar.TimeRange
previousCalendar.TimeRange()->end() Calendar.TimeRange()->equals()next

Method Calendar.TimeRange()->_equal()


Method _equal

int(0..1) Calendar.TimeRange()->`==(object(TimeRange) compared_to)
int(0..1) Calendar.TimeRange()->_equal(object(TimeRange) compared_to)

Description

These two overloads the operator `== and the result of the equal function.

a==b is considered true if the two timeranges are of the same type, have the same rules (language, timezone, etc) and are the same timerange.

equal(a,b) are considered true if a and b are the same timerange, exactly the same as the Calendar.TimeRange.equals method.

The __hash method is also present, to make timeranges possible to use as keys in mappings.

known bugs: _equal is not currently possible to overload, due to wierd bugs, so equal uses `== for now.


Extracted from Pike v7.3 release 11 at 2001-11-03.