The valid format for Date and Datetime type?

167 views
Skip to first unread message

tonytonyjan

unread,
Aug 23, 2017, 8:08:40 AM8/23/17
to Grape Framework Discussion
As title, and it mentions in neither README nor official website. For example:

params do
  requires
:birthday, type: Date
end

How do I know what the time format I should provide for params[:birthday]? ISO8601?

Daniel D.

unread,
Aug 23, 2017, 5:39:44 PM8/23/17
to ruby-...@googlegroups.com
I believe it's anything that is supported by https://github.com/solnic/coercible, which is just about anything that looks like a date, including iso8601, but I could be wrong. Would love some improved documentation here.

--
You received this message because you are subscribed to the Google Groups "Grape Framework Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-grape+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages