All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.utils.dayjs.js Maven / Gradle / Ivy

Go to download

A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.

There is a newer version: 4.12.3
Show newest version
import dayjs from "dayjs";

// const hasTimezone = dateString => {
//   const timezoneRegex = /Z|[+-]\d{2}:\d{2}$|GMT([+-]\d{4})?$/;

//   return timezoneRegex.test(dateString);
// };

// const dayjs = (...args) => {
//   if (args.length > 0 && typeof args[0] === "string" && hasTimezone(args[0])) {
//     args[0] = pureDayjs(args[0]);
//   }

//   const timezone = pureDayjs.tz().$x.$timezone || pureDayjs.tz.guess();

//   return args.length === 2
//     ? pureDayjs.tz(...args, timezone)
//     : pureDayjs.tz(...args);
// };

// Object.assign(dayjs, { ...pureDayjs });

export default dayjs;
//# sourceMappingURL=dayjs.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy