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>
|
||||||
|
|
||||||
<time v-else-if="person.birthdate && person.deathdate" :datetime="person.deathdate" :title="person.deathdate">
|
<time v-else-if="person.birthdate && person.deathdate" :datetime="person.deathdate" :title="person.deathdate">
|
||||||
{{ birthdate }} - {{ deathdate }}
|
{{ $d(birthdate) }} - {{ $d(deathdate) }}
|
||||||
</time>
|
</time>
|
||||||
|
|
||||||
<time v-else-if="person.deathdate" :datetime="person.deathdate" :title="person.deathdate">
|
<time v-else-if="person.deathdate" :datetime="person.deathdate" :title="person.deathdate">
|
||||||
@ -164,21 +164,14 @@ export default {
|
|||||||
},
|
},
|
||||||
birthdate: function(){
|
birthdate: function(){
|
||||||
if(this.person.birthdate !== null){
|
if(this.person.birthdate !== null){
|
||||||
const date = new Date(this.person.birthdate.datetime);
|
return new Date(this.person.birthdate.datetime);
|
||||||
return dateToISO(date)
|
|
||||||
} else {
|
} else {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deathdate: function(){
|
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){
|
if(this.person.deathdate !== null){
|
||||||
const date = new Date(this.person.deathdate.datetime);
|
return new Date(this.person.deathdate.datetime);
|
||||||
return date.toLocaleDateString("fr-FR");
|
|
||||||
} else {
|
} else {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user