Sha256: f8a3264bd1ac2f7370a01e9d5b7f6a0fb72f6c32f5feb6129d540df7ccac2237

Contents?: true

Size: 292 Bytes

Versions: 10

Compression:

Stored size: 292 Bytes

Contents

module Ravelry

  # Utility module that handles date, string, and number parsing.
  #
  module Utilities

    # Expects a format readable by Ruby's Date library.
    #
    def self.pretty_full_date(string)
      parsed = Date.parse(string)
      parsed.strftime("%B %e, %Y")
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ravelry-0.2.0 lib/ravelry/utils/utilities.rb
ravelry-0.1.0 lib/ravelry/utils/utilities.rb
ravelry-0.0.9 lib/ravelry/utils/utilities.rb
ravelry-0.0.8 lib/ravelry/utils/utilities.rb
ravelry-0.0.7 lib/ravelry/utils/utilities.rb
ravelry-0.0.6 lib/ravelry/utils/utilities.rb
ravelry-0.0.5 lib/ravelry/utils/utilities.rb
ravelry-0.0.4 lib/ravelry/utils/utilities.rb
ravelry-0.0.2 lib/ravelry/utils/utilities.rb
ravelry-0.0.1 lib/ravelry/utils/utilities.rb