mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Merge branch 'fix_display_dates' into 'master'
Correct formatting of birth- and deathdate See merge request Chill-Projet/chill-bundles!185
This commit is contained in:
commit
c4c75199d6
@ -35,7 +35,7 @@
|
||||
</time>
|
||||
|
||||
<time v-else-if="person.birthdate && person.deathdate" :datetime="person.deathdate" :title="person.deathdate">
|
||||
{{ birthdate }} - {{ deathdate }}
|
||||
{{ $d(birthdate) }} - {{ $d(deathdate) }}
|
||||
</time>
|
||||
|
||||
<time v-else-if="person.deathdate" :datetime="person.deathdate" :title="person.deathdate">
|
||||
@ -163,22 +163,15 @@ export default {
|
||||
return this.person.gender === 'woman' ? 'person.gender.woman' : this.person.gender === 'man' ? 'person.gender.man' : 'person.gender.neuter';
|
||||
},
|
||||
birthdate: function(){
|
||||
if(this.person.birthdate !== null){
|
||||
const date = new Date(this.person.birthdate.datetime);
|
||||
return dateToISO(date)
|
||||
if(this.person.birthdate !== null || this.person.birthdate === "undefined"){
|
||||
return new Date(this.person.birthdate.datetime);
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
},
|
||||
deathdate: function(){
|
||||
// TODO FIX edition conflict: if null or undefined ?
|
||||
// if (typeof this.person.deathdate !== 'undefined') {
|
||||
// var date = new Date(this.person.deathdate.datetime);
|
||||
// return dateToISO(date);
|
||||
//}
|
||||
if(this.person.deathdate !== null){
|
||||
const date = new Date(this.person.deathdate.datetime);
|
||||
return date.toLocaleDateString("fr-FR");
|
||||
if(this.person.deathdate !== null || this.person.birthdate === "undefined"){
|
||||
return new Date(this.person.deathdate.datetime);
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user