开发者

Using sinatra, how do I construct a proper DateTime value from 3 separate input boxes?

How do I take a numeric month, day and year from three separate text inputs and parse a proper value for my DateTime field开发者_如何转开发 in the db?


date = Date.civil(params[:year].to_i, params[:month].to_i, params[:day].to_i)
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜