Fix bug.
This commit is contained in:
parent
4b0e27a316
commit
3850223d31
|
@ -96,7 +96,7 @@ class WritingConference
|
|||
same_year = period_start_ym[0] == period_end_ym[0]
|
||||
same_month = period_start_ym[1] == period_end_ym[1]
|
||||
if same_year && same_month
|
||||
date = self.period_start_date.strftime(date_format.sub('%d', "%d-#{self.period_end_date.day}"))
|
||||
date = self.period_start_date.strftime(date_format.sub('%d', "%d-#{self.period_end_date.strftime('%d')}"))
|
||||
elsif same_year
|
||||
month_date_format = date_format.match(/(%m|%d)[\-\/\.]*(%m|%d)/)[0] rescue ''
|
||||
date = self.period_start_date.strftime(date_format.sub(month_date_format, "#{month_date_format}-#{self.period_end_date.strftime(month_date_format)}"))
|
||||
|
|
Loading…
Reference in New Issue