本文整理匯總了PHP中Properties::getToDateMasked方法的典型用法代碼示例。如果您正苦於以下問題:PHP Properties::getToDateMasked方法的具體用法?PHP Properties::getToDateMasked怎麽用?PHP Properties::getToDateMasked使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Properties
的用法示例。
在下文中一共展示了Properties::getToDateMasked方法的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');