mirror of https://github.com/vector-im/riot-web
Switch to localeDateString for i18n
parent
716e2effbc
commit
9204ed30ce
|
@ -138,13 +138,9 @@ export function wantsDateSeparator(prevEventDate: Date, nextEventDate: Date): bo
|
|||
}
|
||||
|
||||
export function formatFullDateNoDay(date: Date) {
|
||||
return _t("%(year)s-%(month)s-%(day)s at %(hours)s.%(minutes)s.%(seconds)s", {
|
||||
year: date.getFullYear(),
|
||||
month: pad(date.getMonth() + 1),
|
||||
day: pad(date.getDate()),
|
||||
hours: pad(date.getHours()),
|
||||
minutes: pad(date.getMinutes()),
|
||||
seconds: pad(date.getSeconds()),
|
||||
return _t("%(date)s at %(time)s", {
|
||||
date: date.toLocaleDateString().replace(/\//g, '-'),
|
||||
time: date.toLocaleTimeString().replace(/:/g, '-'),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
"%(weekDayName)s, %(monthName)s %(day)s %(time)s": "%(weekDayName)s, %(monthName)s %(day)s %(time)s",
|
||||
"%(weekDayName)s, %(monthName)s %(day)s %(fullYear)s": "%(weekDayName)s, %(monthName)s %(day)s %(fullYear)s",
|
||||
"%(weekDayName)s, %(monthName)s %(day)s %(fullYear)s %(time)s": "%(weekDayName)s, %(monthName)s %(day)s %(fullYear)s %(time)s",
|
||||
"%(year)s-%(month)s-%(day)s at %(hours)s.%(minutes)s.%(seconds)s": "%(year)s-%(month)s-%(day)s at %(hours)s.%(minutes)s.%(seconds)s",
|
||||
"%(date)s at %(time)s": "%(date)s at %(time)s",
|
||||
"Who would you like to add to this community?": "Who would you like to add to this community?",
|
||||
"Warning: any person you add to a community will be publicly visible to anyone who knows the community ID": "Warning: any person you add to a community will be publicly visible to anyone who knows the community ID",
|
||||
"Invite new community members": "Invite new community members",
|
||||
|
|
Loading…
Reference in New Issue