onix-core
Version:
Onix library core
13 lines • 641 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseMicrosoftFormatOffset = void 0;
const tslib_1 = require("tslib");
const toSafeInteger_1 = tslib_1.__importDefault(require("lodash/toSafeInteger"));
const parseMicrosoftFormatOffset = (offset) => {
var sign = offset.substr(0, 1) === "-" ? -1 : 1;
offset = offset.substring(1);
const result = (toSafeInteger_1.default(offset.substr(0, 2)) * 60) + toSafeInteger_1.default(offset.substring(2));
return sign * result;
};
exports.parseMicrosoftFormatOffset = parseMicrosoftFormatOffset;
//# sourceMappingURL=ParseMicrosoftFormatOffset.js.map