chore: format date

This commit is contained in:
Ephraim Atta-Duncan
2023-08-14 22:01:25 +00:00
committed by Mythie
parent fdd3d7c6fe
commit 0da6e93a6a
3 changed files with 27 additions and 28 deletions

View File

@ -0,0 +1,18 @@
export const formatMonth = (monthStr: string) => {
const [year, month] = monthStr.split('-');
const monthNames = [
'January',
'February',
'March',
'April',
'May',
'June',
'July',
'August',
'September',
'October',
'November',
'December',
];
return `${monthNames[parseInt(month, 10) - 1]} ${year}`;
};