public function testIsDatetimeString() { $this->assertTrue(Validate::isDatetimeString(\NObjects\Date::datetime())); $this->assertFalse(Validate::isDatetimeString(\NObjects\Date::toISO8601())); $this->assertFalse(Validate::isDatetimeString(time())); $this->assertFalse(Validate::isDatetimeString('Some date 10/10/2012')); $this->assertFalse(Validate::isDatetimeString(101)); }
public function testMilliseconds() { $this->assertEquals(round(microtime(true) * 1000), Date::milliseconds()); }