<?php $format="Y-m"; $date="2018-02"; $d = DateTime::createFromFormat($format, $date); echo ($d->format($format)); echo "\n" . date_format($d, $format);
You have javascript disabled. You will not be able to edit any code.