module Grape::Formats::DateTimes
This module provides a set of ready-made Virtus::Attribute
constants, suitable for use as the type
option for {Grape::Dsl::Parameters#requires} and {Grape::Dsl::Parameters#optional}. These definitions will coerce input strings to the standard ruby DateTime
type using the standard parsing methods defined on that class.
This module is not required by default.
Constants
- HttpDate
Parses timestamps using
DateTime.httpdate
- Iso8601
Parses timestamps using
DateTime.iso8601
- Jisx0301
Parses timestamps using
DateTime.jisx0301
- JulianDay
Parses julian dates using
DateTime.jd
. Time of day is not supported.- Rfc2822
Parses timestamps using
DateTime.rfc2822
- Rfc3339
Parses timestamps using
DateTime.rfc3339
- Rfc822
Parses timestamps using
DateTime.rfc822
- XmlSchema
Parses timestamps using
DateTime.xmlschema