PHP Classes

File: Library/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_default_format_interval.test

Recommend this page to a friend!
  Classes of Duong Huynh Nghia   Lego PHP   Library/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_default_format_interval.test   Download  
File: Library/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_default_format_interval.test
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Lego PHP
Blog and shopping cart system
Author: By
Last change:
Date: 7 years ago
Size: 378 bytes
 

Contents

Class file image Download
--TEST-- "date" filter (interval support as of PHP 5.3) --CONDITION-- version_compare(phpversion(), '5.3.0', '>=') --TEMPLATE-- {{ date2|date }} {{ date2|date('%d days') }} --DATA-- date_default_timezone_set('UTC'); $twig->getExtension('core')->setDateFormat('Y-m-d', '%d days %h hours'); return array( 'date2' => new DateInterval('P2D'), ) --EXPECT-- 2 days 0 hours 2 days