PHP Classes

File: libs/Twig/test/Twig/Tests/Fixtures/filters/date_interval.test

Recommend this page to a friend!
  Classes of william amed   Raptor 2   libs/Twig/test/Twig/Tests/Fixtures/filters/date_interval.test   Download  
File: libs/Twig/test/Twig/Tests/Fixtures/filters/date_interval.test
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Raptor 2
Framework that takes routes from annotations
Author: By
Last change:
Date: 8 years ago
Size: 495 bytes
 

Contents

Class file image Download
--TEST-- "date" filter (interval support as of PHP 5.3) --CONDITION-- version_compare(phpversion(), '5.3.0', '>=') --TEMPLATE-- {{ date1|date }} {{ date1|date('%d days %h hours') }} {{ date1|date('%d days %h hours', timezone1) }} --DATA-- date_default_timezone_set('UTC'); return array( 'date1' => new DateInterval('P2D'), // This should have no effect on DateInterval formatting 'timezone1' => new DateTimeZone('America/New_York'), ) --EXPECT-- 2 days 2 days 0 hours 2 days 0 hours