fix for dates

This commit is contained in:
Adrian Hinz 2022-04-30 14:47:11 +02:00
parent b2f188bc5f
commit f0d23f0bf0
1 changed files with 6 additions and 0 deletions

View File

@ -113,6 +113,8 @@ class Dotation < ApplicationRecord
# == Instance Methods =====================================================
def start_date_ret
return if start_date.blank?
if start_date_quarter.eql?(true)
Dotation.display_as_quarter(start_date)
else
@ -121,6 +123,8 @@ class Dotation < ApplicationRecord
end
def end_date_ret
return if end_date.blank?
if end_date_quarter.eql?(true)
Dotation.display_as_quarter(end_date)
else
@ -129,6 +133,8 @@ class Dotation < ApplicationRecord
end
def ann_date_ret
return if announcement_date.blank?
if ann_date_quarter.eql?(true)
Dotation.display_as_quarter(announcement_date)
else