FRED™  3.0
FRED™: Framework for Rapid and Easy Development
Date.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Rsi\Fred\DateTime;
4 
5 class Date extends DateTime{
6 
7  public static function create($value,$format = null){
8  return parent::create(substr($value,0,10),$format ?: '!Y-m-d');
9  }
10 
11  public function __toString(){
12  return $this->format('Y-m-d');
13  }
14 
15 }
static create($value, $format=null)
Definition: Date.php:7