mysterioustrousers / MTPDF

Objective-C PDF objects. Doing my part to help us stay out of the headache that is Core Foundation.
MIT License
205 stars 28 forks source link

Update MTPDF.m #9

Closed amosavian closed 7 years ago

amosavian commented 9 years ago

fixed bug: crash when date field is not standard using NSDateFormatter rather than parsing date string manually

atomkirk commented 9 years ago

Hey, thank you very much for contributing. I'd very much appreciate some tests to show that this works and also consistent style/formatting with the rest of the project. Thanks!

atomkirk commented 8 years ago

I think I did it the way it was because after looking at a bunch of pdfs, the date format could vary wildly, so I tried to make it as flexible as possible, pulling whatever time/date info was there without baulking.

amosavian commented 8 years ago

that's true but your solution doesn't provide additional format compatibility whereas with NSDateFormatter class there is more flexibility to add various formats. Indeed I've forced to use this way because your implementation did't recognise some of them.