mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-01-22 16:46:28 +01:00
Fix wrong month shown for different system date formats
This commit is contained in:
parent
f21a65da9a
commit
2240380f68
1 changed files with 7 additions and 7 deletions
|
@ -377,14 +377,14 @@ function AccountStatuses() {
|
||||||
}
|
}
|
||||||
: {},
|
: {},
|
||||||
);
|
);
|
||||||
|
const [year, month] = value.split('-');
|
||||||
|
const monthIndex = parseInt(month, 10) - 1;
|
||||||
|
const date = new Date(year, monthIndex);
|
||||||
showToast(
|
showToast(
|
||||||
`Showing posts in ${new Date(value).toLocaleString(
|
`Showing posts in ${date.toLocaleString('default', {
|
||||||
'default',
|
|
||||||
{
|
|
||||||
month: 'long',
|
month: 'long',
|
||||||
year: 'numeric',
|
year: 'numeric',
|
||||||
},
|
})}`,
|
||||||
)}`,
|
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in a new issue