fix: re stock

This commit is contained in:
ferdiansyah783
2025-08-14 03:09:00 +07:00
parent 1d5ff78fc2
commit 274cecd1cb
12 changed files with 718 additions and 395 deletions
+10
View File
@@ -36,12 +36,22 @@ export const formatDate = (dateString: any) => {
export const formatDateDDMMYYYY = (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 `${day}-${month}-${year}`
}
export const formatForInputDate = (dateString: Date | string) => {
const date = new Date(dateString)
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 formatDatetime = (dateString: string | number | Date) => {
const date = new Date(dateString)