WPDKDateTime::timeNewLine PHP Method

timeNewLine() public static method

Put a new line before time.
public static timeNewLine ( string $datetime ) : string
$datetime string Date with time.
return string
    public static function timeNewLine($datetime)
    {
        // Get the first ':'
        $pos = strpos($datetime, ':');
        // No time?
        if (false === $pos) {
            return $datetime;
        }
        // Hour start
        $pos = $pos - 2;
        $date = substr($datetime, 0, $pos);
        $time = substr($datetime, $pos);
        return sprintf('%s<br/>%s', $date, $time);
    }