PHP_Framework

Wh1t3projects' PHP framework. Small PHP framework for building web apps and websites

View the Project on GitHub

Syntax: kernel_date([string $format])

This function return the current date and time based on the timezone set in the configuration. If the format is not specified, the default Y-m-d H:i:s is used.


Parameters

Optional format
The format of date to use. If not specified, the default Y-m-d H:i:s is used.


Return values

Returns a formatted date string. May return false if an invalid format is given


Examples:

Show the current time and date using the default format
echo kernel_date();

Show the current date in the year-month-day format using numbers only
echo kernel_date('Y-m-d');

Show the current time in the 24 hours format
echo kernel_date('H:i:s');