瀏覽代碼

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

tags/last-sinatra-version
Adrian Short 11 年之前
父節點
當前提交
c9c36dba7d
共有 1 個檔案被更改,包括 2 行新增1 行删除
  1. +2
    -1
      views/candidate.haml

+ 2
- 1
views/candidate.haml 查看文件

@@ -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…
取消
儲存