jsl-ui 9.28.7 → 9.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,6 +2,8 @@ export declare abstract class date {
2
2
  static parse(value: string, format?: string, settings?: any): Date;
3
3
  static format(date: Date, format?: string, settings?: any): string;
4
4
  static formatTime(value: Date, inputMode: "HourMinute" | "HourMinuteSecond"): string;
5
+ static toLocalDate(value: Date): Date;
6
+ static toUtcDate(value: Date): Date;
5
7
  static now(): Date;
6
8
  static addSeconds(d: any, seconds: any): Date;
7
9
  static addMinutes(d: any, minutes: any): Date;
package/lib/core/date.js CHANGED
@@ -295,6 +295,12 @@ monthNames string[12] - names of the months (optional)
295
295
  }
296
296
  return "";
297
297
  }
298
+ static toLocalDate(value) {
299
+ return date.addMinutes(value, -(value.getTimezoneOffset()));
300
+ }
301
+ static toUtcDate(value) {
302
+ return date.addMinutes(value, +(value.getTimezoneOffset()));
303
+ }
298
304
  static now() {
299
305
  return new Date();
300
306
  }