Exemplo n.º 1
0
Arquivo: Date.php Projeto: Samshal/xsl
 /**
  * @return XsTime
  */
 public static function currentTime()
 {
     return XsTime::now();
 }
Exemplo n.º 2
0
 /**
  * @param $value
  * @return XsTime
  */
 public static function xsTime($value)
 {
     $value = XsTime::castToNodeValue($value);
     return XsTime::fromString($value);
 }
Exemplo n.º 3
0
 public function testTimeLanguage()
 {
     $xsTime = XsTime::fromString('15:37:00');
     $this->assertEquals('15:37:00', $this->transformFile('Stubs/Xsl/Formatting/format-time.xsl', ['time' => (string) $xsTime, 'picture' => '[H]:[m]:[s]', 'language' => 'en']));
 }
Exemplo n.º 4
0
 public function testFormatTimeNoDayOfWeek()
 {
     $this->setExpectedException(InvalidArgumentException::class);
     $xsTime = XsTime::fromString('09:37:00');
     $this->transformFile('Stubs/Xsl/Formatting/format-time.xsl', ['time' => (string) $xsTime, 'picture' => '[F]']);
 }