本文整理汇总了PHP中Properties::setDateTo方法的典型用法代码示例。如果您正苦于以下问题:PHP Properties::setDateTo方法的具体用法?PHP Properties::setDateTo怎么用?PHP Properties::setDateTo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Properties
的用法示例。
在下文中一共展示了Properties::setDateTo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dirname
<?php
include dirname(__FILE__) . '/../../bootstrap/Doctrine.php';
$t = new lime_test(6, new lime_output_color());
$c = new Properties();
$c->setDateFrom('1830/10/05 00:00:00');
$c->setDateFromMask(56);
$t->is($c->getFromDateMasked(), '05/10/1830 <em>00:00:00</em>', 'The date from Is construct and Masked');
$c->setDateTo('1830/10/05 12:36:00');
$c->setDateToMask(62);
$t->is($c->getToDateMasked(), '05/10/1830 12:36:<em>00</em>', 'The date to Is construct and Masked');
$t->is_deeply($c->getDateTo(), array('year' => 1830, 'month' => 10, 'day' => 5, 'hour' => 12, 'minute' => 36, 'second' => ''), 'The date to is masked as array');
$t->is_deeply($c->getDateFrom(), array('year' => 1830, 'month' => 10, 'day' => 5, 'hour' => '', 'minute' => '', 'second' => ''), 'The date from is masked as array');
$d = new FuzzyDateTime('1830/10/05 00:00:00', 56);
$c->setDateTo($d);
$t->is($c->getToDateMasked(), '05/10/1830 <em>00:00:00</em>', 'The date to Is construct and Masked');
$d = new FuzzyDateTime('1830/10/05 12:36:00', 62);
$c->setDateFrom($d);
$t->is($c->getFromDateMasked(), '05/10/1830 12:36:<em>00</em>', 'The date to Is construct and Masked');