Fix date format
This commit is contained in:
parent
d8bb945fb5
commit
0606bda680
|
@ -77,7 +77,9 @@ class Experience
|
||||||
elsif t == "duration"
|
elsif t == "duration"
|
||||||
|
|
||||||
if !p.send('start_date').nil? or !p.send('end_date').nil?
|
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
|
else
|
||||||
date = ""
|
date = ""
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue