Sha256: a2e3e883296fac03375ca9a576095c8ef5b1ed64abcce7e583b7c4b0bebc9c25

Contents?: true

Size: 298 Bytes

Versions: 5

Compression:

Stored size: 298 Bytes

Contents

# frozen_string_literal: true

DateTime.class_eval do
  # @return [String]
  def display_military(all = false)
    strftime(all ? '%m/%d/%Y %T' : '%-m/%-d/%y %T')
  end
end

Time.class_eval do
  # @return [String]
  def display_military(all = false)
    to_datetime.display_military(all)
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

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