PHP 8.2.31
Preview: date.rb Size: 356 B
/proc/thread-self/root/opt/alt/ruby30/share/ruby/optparse/date.rb

# frozen_string_literal: false
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: 7

Name Size Perms Modified Actions
1.51 KB lrw-r--r-- 2024-06-26 13:55:18
Edit Download
356 B lrw-r--r-- 2024-06-26 13:55:18
Edit Download
477 B lrw-r--r-- 2024-06-26 13:55:18
Edit Download
152 B lrw-r--r-- 2024-06-26 13:55:18
Edit Download
219 B lrw-r--r-- 2024-06-26 13:55:18
Edit Download
131 B lrw-r--r-- 2024-06-26 13:55:18
Edit Download
2.01 KB lrw-r--r-- 2024-06-26 13:55:18
Edit Download

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