add campaign
This commit is contained in:
@@ -43,6 +43,15 @@ export const formatDateDDMMYYYY = (dateString: Date | string) => {
|
||||
return `${day}-${month}-${year}`
|
||||
}
|
||||
|
||||
export const formatDateYYYYMMDD = (dateString: Date | string) => {
|
||||
const date = new Date(dateString)
|
||||
date.setHours(0, 0, 0, 0)
|
||||
const day = String(date.getDate()).padStart(2, '0')
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0')
|
||||
const year = date.getFullYear()
|
||||
return `${year}-${month}-${day}`
|
||||
}
|
||||
|
||||
export const formatForInputDate = (dateString: Date | string) => {
|
||||
const date = new Date(dateString)
|
||||
const day = String(date.getDate()).padStart(2, '0')
|
||||
@@ -51,7 +60,6 @@ export const formatForInputDate = (dateString: Date | string) => {
|
||||
return `${year}-${month}-${day}`
|
||||
}
|
||||
|
||||
|
||||
export const formatDatetime = (dateString: string | number | Date) => {
|
||||
const date = new Date(dateString)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user