예제 #1
0
 public function testInvalidSequence()
 {
     $this->setExpectedException(InvalidArgumentException::class, 'Expected a http://www.w3.org/2001/XMLSchema:dateTime object, got xs:item');
     $xsDateTime = XsDateTime::fromString('2015-10-16 15:37:00');
     $this->transformFile('Stubs/Xsl/Formatting/format-invalid-sequence.xsl', ['dateTime' => (string) $xsDateTime, 'picture' => '[Y]']);
 }
예제 #2
0
파일: Date.php 프로젝트: Samshal/xsl
 /**
  * @return XsDateTime
  */
 public static function currentDateTime()
 {
     return XsDateTime::now();
 }
예제 #3
0
파일: Functions.php 프로젝트: Samshal/xsl
 /**
  * @param $value
  * @return XsDateTime
  */
 public static function xsDateTime($value)
 {
     $value = XsDateTime::castToNodeValue($value);
     return XsDateTime::fromString($value);
 }