initial commit
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import {Dispatch, SetStateAction} from 'react'
|
||||
|
||||
export type ID = undefined | null | number
|
||||
export type ID = undefined | null | number | string
|
||||
|
||||
export type PaginationState = {
|
||||
page: number
|
||||
@@ -23,6 +23,7 @@ export type SearchState = {
|
||||
|
||||
export type Response<T> = {
|
||||
data?: T
|
||||
records?: Array<any>
|
||||
payload?: {
|
||||
message?: string
|
||||
errors?: {
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
|
||||
export function NewDateTimeFormatter(isoDateString:any, addHour = true) {
|
||||
const date = new Date(isoDateString);
|
||||
if (addHour) {
|
||||
date.setTime(date.getTime() + 1 * 60 * 60 * 1000);
|
||||
}
|
||||
const formattedDate = date.toLocaleDateString("en-US", {
|
||||
year: "numeric",
|
||||
month: "numeric",
|
||||
day: "numeric",
|
||||
hour: "2-digit",
|
||||
minute: "2-digit",
|
||||
// second: "2-digit",
|
||||
hour12: true,
|
||||
timeZone: "UTC",
|
||||
});
|
||||
return formattedDate;
|
||||
}
|
||||
Reference in New Issue
Block a user