Top "Dateinterval" questions

Data type used for capturing a interval between two date objects.

DateInterval: Unknown or bad format

I get several dateTime informations through an API. It's format is like P29DT48M56.941999S for example. I would …

php datetime fatal-error dateinterval
MYSQL Add working days to date

I want to add 5 days to the provided date, but the calculation must skip weekends. I already know how to …

mysql sql dateinterval
PHP Converting DateInterval to int

I'm using this code: $due_date = new DateTime($_POST['due_date']); $today = new DateTime(); $months = $due_date->diff($today); $…

php date datetime dateinterval date-math
Regex for ISO 8601 durations

I need a regular expression to validate durations in the ISO 8601 duration format (with the exception of fractional parts which …

regex dateinterval