0

The php class DateInterval has its specific format of input such as

new DateInterval('P2Y4DT6H8M');

Is there any way to revert it, meaning to get from the DateInterval instance the originally formatted input:

'P2Y4DT6H8M'

(for example to be stored in database)?

Gomi
  • 632
  • 1
  • 7
  • 23

0 Answers0