Skip to content

Instantly share code, notes, and snippets.

@hunterae
Created September 27, 2010 21:26
Show Gist options
  • Save hunterae/599883 to your computer and use it in GitHub Desktop.
Save hunterae/599883 to your computer and use it in GitHub Desktop.
<% current_month = @date.month %>
<ul class="month-selector">
<% @budget.months.each_with_index do |d, i| %>
- <li><a class="button<%= " ui-state-focus" if current_month == d.month %>" href="?date=<%= URI.escape(Date.parse("#{d.month}/1/#{d.year}").strftime())%>"><%= d.
+ <li><a class="button<%= " ui-state-focus" if current_month == d.month %>" href="?date=<%= "#{d.year}-#{d.month}-01" %>"><%= d.strftime("%b") %><% if i==0 || d.
<% end %>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment