sparkartgroup-archive / sparkart.js

Easily interact with Sparkart's APIs via Javascript.
1 stars 0 forks source link

Format event link publish dates #61

Closed pushred closed 10 years ago

pushred commented 11 years ago

Publish dates were added to the sparkart-services API 6 months (!) ago so that they could be displayed to site visitors prior to the start of ticketing. We didn't use the Events/Event widgets on a site however until Keith Urban due to the API's performance & scalability issues. Sparkart.js handles date formatting by pre-processing API responses before they're passed to the template context for rendering. This step was missing for these dates. We should really be including these in the default template as well but I am deferring that work for an upcoming UX project that will redefine the default templates to be inline with their vision for the next generation of Sparkart fanclubs.

Can someone else please add tests? I made this change quickly hours before these widgets went live on the Keith Urban site.

djiang commented 11 years ago

Aside from tabs vs spaces issue, code looks good. I'll add some basic tests as there are already some tests in place in #60 regarding the convertDate method

djiang commented 11 years ago

Rebased branch then added some basic sanity checks and slightly optimized my tests from the other branch