idea-toolbox
Advanced tools
Comparing version 6.0.5 to 6.1.0
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.AppointmentNotificationUnitsOfTime = exports.AppointmentNotificationMethods = exports.AppointmentNotification = exports.AppointmentAttendance = exports.AppointmentAttendee = exports.AppointmentLinkedObjectTypes = exports.AppointmentLinkedObject = exports.AppointmentKeys = exports.Appointment = void 0; | ||
const Moment = require("moment-timezone"); | ||
const resource_model_1 = require("./resource.model"); | ||
@@ -33,3 +32,3 @@ /** | ||
this.fixAllDayTime(); | ||
this.timezone = this.clean(x.timezone || Moment.tz.guess(), String); | ||
this.timezone = this.clean(x.timezone, String); | ||
if (x.linkToOrigin) | ||
@@ -55,4 +54,8 @@ this.linkToOrigin = this.clean(x.linkToOrigin, String); | ||
if (this.allDay) { | ||
this.startTime = Number(Moment(this.startTime).startOf('day').format('x')); | ||
this.endTime = Number(Moment(this.endTime).startOf('day').add(13, 'hours').format('x')); | ||
const start = new Date(this.startTime); | ||
start.setHours(0, 0, 0); | ||
this.startTime = start.getTime(); | ||
const end = new Date(this.endTime); | ||
end.setHours(13, 0, 0); | ||
this.endTime = end.getTime(); | ||
} | ||
@@ -109,5 +112,7 @@ } | ||
const maxNumMinutes = Math.max.apply(null, this.notifications.map(n => n.minutes)); | ||
const at = Moment(this.startTime).subtract(maxNumMinutes, 'minutes'); | ||
this.internalNotificationFiresOn = at.format('YYYYMMDDHH'); | ||
this.internalNotificationFiresAt = at.minutes(); | ||
// prepare the support firing attributes | ||
const at = new Date(this.startTime); | ||
at.setMinutes(at.getMinutes() - maxNumMinutes); | ||
this.internalNotificationFiresOn = String(at.getFullYear()).concat(('00' + (at.getMonth() + 1)).slice(-2), ('00' + at.getDate()).slice(-2), ('00' + at.getHours()).slice(-2)); | ||
this.internalNotificationFiresAt = at.getMinutes(); | ||
} | ||
@@ -114,0 +119,0 @@ /** |
@@ -5,3 +5,2 @@ "use strict"; | ||
const resource_model_1 = require("./resource.model"); | ||
const Moment = require("moment-timezone"); | ||
/** | ||
@@ -33,3 +32,3 @@ * Representation of a calendar, which can be: | ||
this.color = this.clean(x.color, String); | ||
this.timezone = this.clean(x.timezone || Moment.tz.guess(), String); | ||
this.timezone = this.clean(x.timezone, String); | ||
if (x.external) | ||
@@ -36,0 +35,0 @@ this.external = new ExternalCalendarInfo(x.external); |
{ | ||
"name": "idea-toolbox", | ||
"version": "6.0.5", | ||
"version": "6.1.0", | ||
"description": "IDEA's utility functions", | ||
@@ -30,4 +30,2 @@ "engines": { | ||
"dependencies": { | ||
"moment": "^2.24.0", | ||
"moment-timezone": "^0.5.28", | ||
"showdown": "^1.9.1", | ||
@@ -34,0 +32,0 @@ "validator": "^10.11.0" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
230531
2
6772
- Removedmoment@^2.24.0
- Removedmoment-timezone@^0.5.28
- Removedmoment@2.30.1(transitive)
- Removedmoment-timezone@0.5.46(transitive)