Sha256: 91592456de4fd2a5e24420089207acd38329bb435672bdafd3063f0878f57863

Contents?: true

Size: 279 Bytes

Versions: 5

Compression:

Stored size: 279 Bytes

Contents

# frozen_string_literal: true

Date.class_eval do
  # @return [String] - yyyy-mm-dd
  def input(_all = false)
    strftime('%F')
  end
end

DateTime.class_eval do
  # @return [String] - yyyy-mm-dd[Thh:mm::ss]
  def input(all = false)
    strftime(all ? '%F %T' : '%F')
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
input_extension-1.0.0 lib/input_extension.rb
input_extension-1.0.0.pre.rc.1 lib/input_extension.rb
input_extension-0.0.5 lib/input_extension.rb
input_extension-0.0.4 lib/input_extension.rb
input_extension-0.0.3 lib/input_extension.rb