Browse Source

Fix date parsing (it should be a Time not Date object)

tags/last-sinatra-version
Adrian Short 11 years ago
parent
commit
c9c36dba7d
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      views/candidate.haml

+ 2
- 1
views/candidate.haml View File

@@ -22,7 +22,8 @@
%td{ :style => "background-color: #{ccy['party_colour']}" }  
%td
%a{ :href => "/bodies/#{ccy['body_slug']}/elections/#{ccy['d']}" }
= long_date(Date.parse(ccy['d']))
- bits = ccy['d'].split("-")
= long_date(Time.mktime(bits[0], bits[1], bits[2]))
%td= ccy['party_name']
%td
%a{ :href => "/bodies/#{ccy['body_slug']}" }


Loading…
Cancel
Save