开发者

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

开发者 https://www.devze.com 2023-01-05 00:09 出处:网络
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[:mont

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

精彩评论

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