Skip to content

strtotime()

The strtotime() function converts a textual date into a Unix timestamp.

$timestamp = strtotime("next Monday");
echo date("Y-m-d", $timestamp);
echo strtotime("2025-01-01");