Class: Decidim::Attributes::TimeWithZone
- Inherits:
-
ActiveModel::Type::DateTime
- Object
- ActiveModel::Type::DateTime
- Decidim::Attributes::TimeWithZone
- Defined in:
- decidim-core/lib/decidim/attributes/time_with_zone.rb
Overview
Custom attributes value to parse a String representing a Time using the app TimeZone.
Constant Summary collapse
- ISO_DATETIME_WITHOUT_TIMEZONE =
Date format: 2020-06-20T, 2020-06-20, 20/06/2020T or 20/06/2020 Time format: 10:20, 10:20:30 or 10:20:30.123456
%r{ \A ((\d{4})-(\d\d)-(\d\d)|(\d\d)/(\d\d)/(\d{4}))(?:T|\s) (\d\d):(\d\d)(:(\d\d)(?:\.(\d{1,6})\d*)?)? \z }x
Instance Method Summary collapse
Instance Method Details
#type ⇒ Object
17 18 19 |
# File 'decidim-core/lib/decidim/attributes/time_with_zone.rb', line 17 def type :"decidim/attributes/time_with_zone" end |