OptionParser doesn't accept Date options as stated in the docs
The documentation for OptionParser states that Date, Time and DateTime are supported types for automatic coertion, however, it raises an error if any of those types are provided to the "on" method: "unsupported argument type: Date".
Either the documentation is wrong or there's a bug in the implementation of OptionParser I guess.
Thanks for taking a look into this.
Updated by oleynikov (Alexander Oleynikov) 26 days ago
You need to
require 'optparse/time' to use built-in Time conversion (it doesn't seem to be stated explicitly in the documentation, but it is demonstrated throughout the examples) and you need to
require 'optparse/date' to use Date or DateTime conversions. Or you can define custom conversions.