예제 #1
0
파일: Date.php 프로젝트: 4Publish/4p_core
 public function isTomorrow()
 {
     return $this->mysqlDate() == Date::fromUnixTime(strtotime('today +1 day'))->mysqlDate();
 }
예제 #2
0
 protected function onNodeChange($id_node, $node, $old_node)
 {
     $this->O->event()->trigger($this->namespace . '.node.change');
     $uid = $this->O->auth()->uid();
     $label = Filter::text('node.revision.label', $node, 'revision');
     $comment = Filter::text('node.revision.comment', $node);
     $this->addRevision($id_node, $uid, $label, $comment, Date::fromStrtotime(time())->mysqlDateTime(), $old_node);
 }
예제 #3
0
 /**
  * @covers Fp\Core\Date::format
  * @todo   Implement testFormat().
  */
 public function testFormat()
 {
     $this->assertEquals('25/12/1998 01:00', \Fp\Core\Date::fromUnixTime(914544000)->format('d/m/Y h:i'));
 }