PHP 8.2.31
Preview: date.rb Size: 325 B
/proc/thread-self/root/opt/alt/ruby18/lib64/ruby/1.8/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-- 2007-02-12 23:01:19
Edit Download
121 B lrw-r--r-- 2007-02-12 23:01:19
Edit Download
188 B lrw-r--r-- 2007-02-12 23:01:19
Edit Download
100 B lrw-r--r-- 2007-02-12 23:01:19
Edit Download
1.98 KB lrw-r--r-- 2007-02-12 23:01:19
Edit Download

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