All Commands
All Format
Commands
STRTOTIME
STRTOTIME is an abbreviation of STRing TO TIME
Takes an English date format and will try to parse that format into a Unix timestamp.
php.net/manual/en/function.strtotime.phpEuropean Dates such as 15-05-2021 should have a dash as a seperator whereas the US format of 05/15/2021 needs to have a forward slash.
Other examples are
- "now"
- "10 September 2050"
- "+1 day"
- "+1 week"
- "+1 week 2 days 4 hours 2 seconds"
- "next Thursday"
- "last Monday"
Number | Name | Default | Type | Description |
---|---|---|---|---|
1 | time | String | Time to convert. See php.net/manual/en/datetime.formats.php for valid formats. | |
2 | now | time() | Integer | The timestamp which is used as a base for the calculation of relative dates. |
Example
1621036800 15-05-2021
1732416132 now
1621036800 15 May 2021
1732502532 +1 day
1733020932 +1 week
1733208134 +1 week 2 days 4 hours 2 seconds
1732752000 next Thursday
1731888000 last Monday
1732416132 now
1621036800 15 May 2021
1732502532 +1 day
1733020932 +1 week
1733208134 +1 week 2 days 4 hours 2 seconds
1732752000 next Thursday
1731888000 last Monday