2013-03-26から1日間の記事一覧

Rubyで日付の比較

# coding: utf-8 require 'date' today = Date.today target = Date.parse('2013-06-01') p today.to_s p target.to_s if today < target p "EARLY BIRD" else p "NORMAL REGISTRATION" end