lewsid / chargify-php

Chargify API wrapper for PHP
http://chargify.com
6 stars 1 forks source link

converting DATETIME to DATE #2

Closed mkeplinger closed 14 years ago

mkeplinger commented 14 years ago

I noticed that you are stripping away the DATETIME and converting it to DATE. I assume this is because your application only requires the date? We required the whole DATETIME and have modified the code within http://github.com/lewsid/chargify_api_php/blob/master/lib/ChargifySubscription.php

else { return $this->format_timestamp($date_format, $this->current_period_ends_at); }

to { return $this->current_period_ends_at; }

I would suggest leaving the data as Chargify sends it and allowing the user to decide how to use that data?

I work with vectoroc and we are using this connector extensively for our application.

lewsid commented 14 years ago

Thanks for pointing this out. My original intention was not to strip off the time, but it appears that exactly what I ended up doing. I will review your changes and either merge them, or marry them into a more inclusive fix.

lewsid commented 14 years ago

I'm taking a closer look at this; with the code as it is, just don't pass any variable and it will return the date/time exactly as chargify would hand it off. Perhaps I'm misunderstanding.