Date.js and Timeframe.js and Load Order
Javascript’s all the rage these days, with some amazing libraries popping up daily. Two I really like are Date.js and a recent player for manipulating times, Timeframe.js.
However it turns out if you’re going to combine these into the same project (at least for Timeframe 0.2 and Date 1.1 Alpha-1, check your versions) you need to be careful about the load order otherwise some stomping goes on.
Load date.js and then timeframe.js, otherwise the display values for Timeframe get stomped and you’ll see the raw formatting codes rather than dates.
For the Railies:
<%= javascript_include_tag 'date.js', 'timeframe.js', :cache => true %>