Skip to content

Commit bd40ee6

Browse files
fix(common): correct Date constructor usage in formatDate utility
1 parent 54ea9d9 commit bd40ee6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/common/utils/commonUtils.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export function formatDate(dateString) {
4848
const [year, month, day] = datePart.split('-');
4949

5050
// Convert the month number to the month name
51-
const monthName = Date(year, month, day).split(' ');
51+
const monthName = new Date(year, month - 1, day).toLocaleString('default', { month: 'short' });
5252

5353
const formattedDate = `Joined ${day} ${monthName[1]} ${year}`;
5454

0 commit comments

Comments
 (0)