diff --git a/app/models/experience.rb b/app/models/experience.rb index 0e7b775..e47bc24 100644 --- a/app/models/experience.rb +++ b/app/models/experience.rb @@ -77,7 +77,9 @@ class Experience elsif t == "duration" if !p.send('start_date').nil? or !p.send('end_date').nil? - date = (p.send('start_date').strftime('%Y.%m') rescue "")+' ~ '+(p.send('end_date').strftime('%Y.%m') rescue I18n.t('personal_experience.up_to_today')) + start_date = ((p.send('start_date').blank?) ? "" : p.send('start_date').strftime('%Y.%m')) rescue "" + end_date = ((p.send('end_date').blank? || p.send('end_date').to_s == "0000-01-01" ) ? I18n.t('personal_experience.up_to_today') : p.send('end_date').strftime('%Y.%m')) rescue I18n.t('personal_experience.up_to_today') + date = start_date+' ~ '+end_date else date = "" end