Sha256: 7aac5e0668fb4bcd1c4cd2c3a121e4f50f35794b9912ea94015a24f230af7c87

Contents?: true

Size: 387 Bytes

Versions: 7

Compression:

Stored size: 387 Bytes

Contents

# frozen_string_literal: true

module Spina
  module Admin::Conferences::Blog
    # Spina::Blog::PostsHelper
    module PostsHelper
      def formatted_date(year, month)
        if month
          date = Date.new year.to_i, month.to_i
          date.strftime('%B %Y')
        else
          date = Date.new year.to_i
          date.strftime('%Y')
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
spina-admin-conferences-blog-0.3.1 app/helpers/spina/admin/conferences/blog/posts_helper.rb
spina-admin-conferences-blog-0.2.0 app/helpers/spina/admin/conferences/blog/posts_helper.rb
spina-admin-conferences-blog-0.1.4 app/helpers/spina/admin/conferences/blog/posts_helper.rb
spina-admin-conferences-blog-0.1.3 app/helpers/spina/admin/conferences/blog/posts_helper.rb
spina-admin-conferences-blog-0.1.2 app/helpers/spina/admin/conferences/blog/posts_helper.rb
spina-admin-conferences-blog-0.1.1 app/helpers/spina/admin/conferences/blog/posts_helper.rb
spina-admin-conferences-blog-0.1.0 app/helpers/spina/admin/conferences/blog/posts_helper.rb