kopia lustrzana https://github.com/cheeaun/phanpy
Fix wrong month shown for different system date formats
rodzic
f21a65da9a
commit
2240380f68
|
@ -377,14 +377,14 @@ function AccountStatuses() {
|
|||
}
|
||||
: {},
|
||||
);
|
||||
const [year, month] = value.split('-');
|
||||
const monthIndex = parseInt(month, 10) - 1;
|
||||
const date = new Date(year, monthIndex);
|
||||
showToast(
|
||||
`Showing posts in ${new Date(value).toLocaleString(
|
||||
'default',
|
||||
{
|
||||
month: 'long',
|
||||
year: 'numeric',
|
||||
},
|
||||
)}`,
|
||||
`Showing posts in ${date.toLocaleString('default', {
|
||||
month: 'long',
|
||||
year: 'numeric',
|
||||
})}`,
|
||||
);
|
||||
}}
|
||||
/>
|
||||
|
|
Ładowanie…
Reference in New Issue