mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
correct formatting of birth- and deathdate
This commit is contained in:
parent
2f053d3b5f
commit
00ad7a74d6
@ -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">
|
||||
@ -164,21 +164,14 @@ export default {
|
||||
},
|
||||
birthdate: function(){
|
||||
if(this.person.birthdate !== null){
|
||||
const date = new Date(this.person.birthdate.datetime);
|
||||
return dateToISO(date)
|
||||
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");
|
||||
return new Date(this.person.deathdate.datetime);
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user