Commit inicial
This commit is contained in:
15
frontend/utils/formatters.ts
Normal file
15
frontend/utils/formatters.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
// utils/formatters.ts
|
||||
// Shared formatting utilities
|
||||
|
||||
/**
|
||||
* Formats the current date as "Month Year" in Spanish
|
||||
* Example: "Enero 2025"
|
||||
*/
|
||||
export const formatDateMonthYear = (): string => {
|
||||
const now = new Date();
|
||||
const months = [
|
||||
'Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio',
|
||||
'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'
|
||||
];
|
||||
return `${months[now.getMonth()]} ${now.getFullYear()}`;
|
||||
};
|
||||
Reference in New Issue
Block a user