PHP 8.2.31
Preview: date.rb Size: 325 B
//proc/thread-self/root/opt/alt/ruby19/lib64/ruby/1.9.1/optparse/date.rb

require 'optparse'
require 'date'

OptionParser.accept(DateTime) do |s,|
  begin
    DateTime.parse(s) if s
  rescue ArgumentError
    raise OptionParser::InvalidArgument, s
  end
end
OptionParser.accept(Date) do |s,|
  begin
    Date.parse(s) if s
  rescue ArgumentError
    raise OptionParser::InvalidArgument, s
  end
end

Directory Contents

Dirs: 0 × Files: 5

Name Size Perms Modified Actions
325 B lrw-r--r-- 2009-10-02 10:45:39
Edit Download
121 B lrw-r--r-- 2009-10-02 10:45:39
Edit Download
188 B lrw-r--r-- 2009-10-02 10:45:39
Edit Download
100 B lrw-r--r-- 2009-10-02 10:45:39
Edit Download
1.99 KB lrw-r--r-- 2009-10-02 10:45:39
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).