Sha256: 2074e73341686f9c063e1d33f56e64cb069063448110ec0b6d50c035fb795dd2

Contents?: true

Size: 351 Bytes

Versions: 2

Compression:

Stored size: 351 Bytes

Contents

desc "List available date time formats"
task :date_time_formats => :environment do
  puts ["KEY".ljust(30), "FORMAT".ljust(30), "RESULT".ljust(30), "USAGE"].join(" ")

  DateTimeFormats.formats.each do |key,format|
    puts ["#{key}".ljust(30), "#{format}".ljust(30), Time.now.to_s(key.to_sym).ljust(30), "Time.now.to_s(:#{key})"].join(" ")
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
date_time_formats-0.1.1 lib/tasks/date_time_formats_tasks.rake
date_time_formats-0.1.0 lib/tasks/date_time_formats_tasks.rake