New logic
This commit is contained in:
12
utils/date_for_humans.rb
Normal file
12
utils/date_for_humans.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# array with list of months in portuguese
|
||||
# @return [Array] list of months in portuguese
|
||||
def months
|
||||
%w[janeiro fevereiro março abril maio junho julho agosto setembro outubro novembro dezembro]
|
||||
end
|
||||
|
||||
# Returns the month in portuguese
|
||||
def month_for_humans(month)
|
||||
months[month - 1]
|
||||
end
|
Reference in New Issue
Block a user