Class/Module Index [+]

Quicksearch

HammerCLI::Options::Normalizers::DateTime

Public Instance Methods

description() click to toggle source
# File lib/hammer_cli/options/normalizers.rb, line 145
def description
  _("Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format")
end
format(date) click to toggle source
# File lib/hammer_cli/options/normalizers.rb, line 149
def format(date)
  raise ArgumentError unless date
  ::DateTime.parse(date).to_s
rescue ArgumentError
  raise ArgumentError, _("'%s' is not a valid date") % date
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.