add campaign

This commit is contained in:
efrilm
2025-09-19 16:10:52 +07:00
parent 3bfd0b9e19
commit e55357e305
4 changed files with 72 additions and 352 deletions
+9 -1
View File
@@ -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)