strtotime

strtotime — Parses about any English textual datetime description into a Unix timestamp

strtotime(string $datetime, ?int $baseTimestamp = null): int|false

Examples:

echo strtotime(“now”), “\n”;
echo strtotime(“31 December 1999”), “\n”;
echo strtotime(“+1 day”), “\n”;
echo strtotime(“+1 week”), “\n”;
echo strtotime(“+1 week 2 days 4 hours 2 seconds”), “\n”;
echo strtotime(“next Thursday”), “\n”;
echo strtotime(“last Monday”), “\n”;

Note:

If the number of the year is specified in a two digit format, the values between 00-69 are mapped to 2000-2069 and 70-99 to 1970-1999.

Input:
[?]

Have Feedback?

Let us know how we can improve this tool.
Share Feedback