Example #1
0
 public function testName()
 {
     $timeZone = new CTimeZone("Europe/Helsinki");
     $this->assertTrue($timeZone->name()->equals("Europe/Helsinki"));
 }
Example #2
0
 /**
  * Determines if a time zone is equal to another time zone, comparing them by name.
  *
  * @param  CTimeZone $toTimeZone The second time zone for comparison.
  *
  * @return bool `true` if *this* time zone is equal to the second time zone, `false` otherwise.
  */
 public function equals($toTimeZone)
 {
     // Parameter type hinting is not used for the purpose of interface compatibility.
     assert('is_ctimezone($toTimeZone)', vs(isset($this), get_defined_vars()));
     return CString::equals($this->name(), $toTimeZone->name());
 }