- Fix Facebook slow down the loading... inserted only a static image !#106

- Others fix to the CCardDiscipline
This commit is contained in:
Paolo Arena
2019-11-17 22:24:41 +01:00
parent ca7ee49944
commit 17d5a50662
10 changed files with 92 additions and 28 deletions

View File

@@ -1770,6 +1770,24 @@ export const tools = {
},
getstrVeryVeryShortDate(mydate) {
const DateFormatter = new Intl.DateTimeFormat(func_tools.getLocale() || void 0, {
weekday: 'long',
day: 'numeric',
// timeZone: 'UTC'
})
try {
if (DateFormatter) {
const date1 = new Date(mydate)
return DateFormatter.format(date1)
}
return mydate
} catch (e) {
return ''
}
},
getstrDateTimeEvent(mythis, myevent, withhtml) {
let mystr = ''
// is same day?
@@ -1805,9 +1823,9 @@ export const tools = {
// is same day?
if (tools.getstrShortDate(myevent.dateTimeStart) === tools.getstrShortDate(myevent.dateTimeEnd)) {
mystr = `${tools.getstrShortDate(myevent.dateTimeStart)}
h. ${ tools.getstrTime(myevent.dateTimeStart) }`
- ${ tools.getstrTime(myevent.dateTimeStart) }`
} else {
mystr = `${tools.getstrShortDate(myevent.dateTimeStart)} - ${ tools.getstrShortDate(myevent.dateTimeEnd) }`
mystr = `${tools.getstrVeryVeryShortDate(myevent.dateTimeStart)} - ${ tools.getstrShortDate(myevent.dateTimeEnd) }`
}