Ejemplo n.º 1
0
 /**
  * Checks if the window is empty.
  *
  * @return bool true if the window is only a standard offset
  */
 function isSingleWindowStandardOffset()
 {
     return $this->windowEnd->equals(LocalDateTime::MAX()) && $this->timeDefinition == TimeDefinition::WALL() && $this->fixedSavingAmountSecs === null && empty($this->lastRuleList) && empty($this->ruleList);
 }
Ejemplo n.º 2
0
 /**
  * Checks if this date-time is equal to another date-time.
  * <p>
  * The comparison is based on the local date-time and the offset.
  * To compare for the same instant on the time-line, use {@link #isEqual}.
  * Only objects of type {@code OffsetDateTime} are compared, other types return false.
  *
  * @param mixed $obj the object to check, null returns false
  * @return true if this is equal to the other date-time
  */
 public function equals($obj)
 {
     if ($this === $obj) {
         return true;
     }
     if ($obj instanceof OffsetDateTime) {
         $other = $obj;
         return $this->dateTime->equals($other->dateTime) && $this->offset->equals($other->offset);
     }
     return false;
 }
Ejemplo n.º 3
0
 /**
  * Checks if this object equals another.
  * <p>
  * The entire state of the object is compared.
  *
  * @param mixed $other the other object to compare to, null returns false
  * @return bool true if equal
  */
 public function equals($other)
 {
     if ($other === $this) {
         return true;
     }
     if ($other instanceof ZoneOffsetTransition) {
         $d = $other;
         return $this->transition->equals($d->transition) && $this->offsetBefore->equals($d->offsetBefore) && $this->offsetAfter->equals($d->offsetAfter);
     }
     return false;
 }