Module: Spina::Admin::Conferences::Blog::PostsHelper

Defined in:
app/helpers/spina/admin/conferences/blog/posts_helper.rb

Overview

Spina::Blog::PostsHelper

Instance Method Summary collapse

Instance Method Details

#formatted_date(year, month) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'app/helpers/spina/admin/conferences/blog/posts_helper.rb', line 7

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