Example #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]']);
 }
Example #2
0
File: Date.php Project: Samshal/xsl
 /**
  * @return XsDateTime
  */
 public static function currentDateTime()
 {
     return XsDateTime::now();
 }
Example #3
0
 /**
  * @param $value
  * @return XsDateTime
  */
 public static function xsDateTime($value)
 {
     $value = XsDateTime::castToNodeValue($value);
     return XsDateTime::fromString($value);
 }