function year($input) { $year = new VF_Year($input); $year->setY2KMode($this->Y2KMode); $year->setThreshold($this->threshold); return $year; }
function year($value) { $year = new VF_Year($value); if (isset($this->getConfig()->importer->Y2KMode) && false === $this->getConfig()->importer->Y2KMode) { $year->setY2KMode(false); } if ($this->getConfig()->importer->Y2KThreshold) { $year->setThreshold($this->getConfig()->importer->Y2KThreshold); } return $year; }
function testWhen2DigitYear60OrGreaterShouldCastTo20thCentury() { $year = new VF_Year(60); $year->setThreshold(60); $this->assertEquals( 1960, $year->value(), 'when two digit year is 60 or greater, should cast to 20th century' ); }