fix date compare bug for ruby 1.9.3