odata/library/ODataProducer/Providers/Metadata/Type/DateTime.php
/**
     * Gets year from datetime
     * 
     * @param string $dateTime datetime to get the year from
     * 
     * @return int
     */
Gets year from datetime

@param string $dateTime datetime to get the year from

@return int
Gets year from datetime @param string $dateTime datetime to get the year from @return int
public static function year($dateTime)
    {
        $date = new \DateTime($dateTime);
        return $date->format("Y");
    }
public static function year ( $ dateTime ) { $ date = new \ DateTime ( $ dateTime ) ; return $ date -> format ( " Y " ) ; }
Gets year from datetime
Gets year from datetime