mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 00:03:33 +10:00
chore: format date
This commit is contained in:
committed by
Mythie
parent
fdd3d7c6fe
commit
0da6e93a6a
18
packages/lib/client-only/format-month.ts
Normal file
18
packages/lib/client-only/format-month.ts
Normal 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}`;
|
||||
};
|
||||
Reference in New Issue
Block a user