reactstrap-react-lib
Advanced tools
Comparing version
@@ -60,2 +60,3 @@ import { AgeType } from "../Interfaces/types"; | ||
getNextDayFromDate(IsoDateString: string): string; | ||
getUTCOffset(timezone: TimeZomes): any; | ||
/** | ||
@@ -62,0 +63,0 @@ * This method return the class variable date in strig |
@@ -154,2 +154,13 @@ "use strict"; | ||
} | ||
getUTCOffset(timezone) { | ||
const now = new Date(); | ||
const dtf = new Intl.DateTimeFormat('en-US', { | ||
timeZone: timezone, | ||
timeZoneName: "longOffset", | ||
}); | ||
// @ts-ignore | ||
const parts = dtf.formatToParts(now); | ||
const offsetPart = parts.find((part) => part.type === 'timeZoneName'); | ||
return (offsetPart === null || offsetPart === void 0 ? void 0 : offsetPart.value) || null; | ||
} | ||
/** | ||
@@ -156,0 +167,0 @@ * This method return the class variable date in strig |
{ | ||
"name": "reactstrap-react-lib", | ||
"version": "11.0.2", | ||
"version": "11.0.3", | ||
"description": "This is a lib for react and next", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
240671
0.4%3145
0.38%