feat: refactor date handling in ads and news creation/update
This commit is contained in:
@@ -11,6 +11,12 @@ export const formatDate = (isoDate: string): string => {
|
||||
}).format(date)
|
||||
}
|
||||
|
||||
export const dateInput = (isoDate: string): string =>
|
||||
new Date(isoDate).toISOString().split('T')[0]
|
||||
|
||||
export const datePayload = (date: string): string =>
|
||||
new Date(date).toISOString()
|
||||
|
||||
export const urlFriendlyCode = (input: string) => {
|
||||
return input
|
||||
.trim()
|
||||
|
||||
Reference in New Issue
Block a user