本文整理汇总了PHP中DateHelper::getTimestampAtMidnight方法的典型用法代码示例。如果您正苦于以下问题:PHP DateHelper::getTimestampAtMidnight方法的具体用法?PHP DateHelper::getTimestampAtMidnight怎么用?PHP DateHelper::getTimestampAtMidnight使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DateHelper
的用法示例。
在下文中一共展示了DateHelper::getTimestampAtMidnight方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: itComputesTheTimestamp3DaysInTheFutureAtMidnight
public function itComputesTheTimestamp3DaysInTheFutureAtMidnight()
{
$expected_time = strtotime('+3 days', $this->today_at_midnight);
$this->assertEqual($expected_time, DateHelper::getTimestampAtMidnight("+3 days"));
}
示例2: getArtifactsByreminder
/**
* Get artifacts that will send notification for a reminder
*
* @param Tracker_DateReminder $reminder Reminder on which the notification is based on
*
* @return Array
*/
public function getArtifactsByreminder(Tracker_DateReminder $reminder)
{
$time_string = '-';
if ($reminder->getNotificationType() == 0) {
$time_string = '+';
}
$time_string .= $reminder->getDistance() . ' days';
$date = DateHelper::getTimestampAtMidnight($time_string);
$field = $reminder->getField();
return $field->getArtifactsByCriterias($date, $this->getTracker()->getId());
}