New logic

This commit is contained in:
2024-05-17 12:56:03 +01:00
parent ec07527653
commit 7ace0f471d
2 changed files with 14 additions and 1 deletions

12
utils/date_for_humans.rb Normal file
View 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