开发者

how to validate a date [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot b开发者_开发问答e reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 12 years ago.

how to validate a given date


Prepare a time object from params and simply check it from Time.now

t1 = Time.new(params[:date])

if t1 > Time.now
       # your code 
end
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜