SensioFrameworkExtraBundle
SensioFrameworkExtraBundle copied to clipboard
Add a DateInterval ParamConverter
Hi!
I don't know if you're interested in this kind of contribution but I needed a ParamConverter for DateInterval objects in a project lately and I thought it could be a useful addition to this bundle along with the already present DateInterval converter.
This converter converts string such as "P1DT3H30M" or "2 weeks" passed as parameter URLs into DateInterval objects.
I've also added some tests of course, mostly by copying what had been done for DateTimeParamConverter. Let me know if more are needed.
Cheers,
Laurent