public function datefromApi($date, $std = false) {
         $object = \DateTime::createFromFormat(API::API_DATE_FORMAT, $date);
      
          if ($std) {
            return getdate($object->getTimestamp());
          }

          return $object;
        }
public function datefromApi($date, $std = false) {
         $object = \DateTime::createFromFormat(API::API_DATE_FORMAT, $date);
      
          if ($std) {
            return getdate($object->getTimestamp());
          }

          return $object;
        }
public function datefromApi ( $ date , $ std = false ) { $ object = \ DateTime :: createFromFormat ( API :: API_DATE_FORMAT , $ date ) ; if ( $ std ) { return getdate ( $ object -> getTimestamp ( ) ) ; } return $ object ; }
make a catapult formatted
date a native PHP date or unix
stamp
@param date: Catapult date (2015-01-12T13:49:43Z) format
@param std: Standard PHP dates
make a catapult formatted date a native PHP date or unix stamp