ggez-banking-sdk
Version:
A Node.js package to handle GGEZ Banking API endpoints, Simplify the process of managing CRUD operations with this efficient and easy-to-use package.
24 lines (23 loc) • 665 B
JavaScript
import dayjs from "dayjs";
import utc from "dayjs/plugin/utc";
import timezone from "dayjs/plugin/timezone";
dayjs.extend(utc);
dayjs.extend(timezone);
class DateTimeHelper {
static now() {
return new Date().getTime();
}
static getClientTimeZone() {
return `UTC ${dayjs.tz(new Date()).format("Z")}`;
}
static getClientTimeZoneName() {
return dayjs.tz(new Date()).format("Z");
}
static getDateUTC() {
return dayjs.utc(new Date()).format("YYYY-MM-DD HH:mm:ss.SSS");
}
static getClientDate() {
return dayjs.tz(new Date()).format("YYYY-MM-DD HH:mm:ss.SSS");
}
}
export { DateTimeHelper };