@salesforcedevs/dx-components 1.3.15 → 1.3.16

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/dx-components",
3
- "version": "1.3.15",
3
+ "version": "1.3.16",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -32,9 +32,11 @@
32
32
  "@types/lodash.defaults": "^4.2.7",
33
33
  "@types/lodash.get": "^4.4.6",
34
34
  "@types/lodash.kebabcase": "^4.1.7",
35
+ "@types/luxon": "^3.1.0",
35
36
  "@types/uuid": "^8.3.4",
36
37
  "@types/vimeo__player": "^2.16.2",
37
- "eventsourcemock": "^2.0.0"
38
+ "eventsourcemock": "^2.0.0",
39
+ "luxon": "^3.1.0"
38
40
  },
39
- "gitHead": "4f666690d99a33edd60c92c55d84732b7feadb07"
41
+ "gitHead": "9bc872aa74451b077e4c1d70a7b2378a01a2337a"
40
42
  }
@@ -11,6 +11,8 @@ import {
11
11
  formattedDateYear
12
12
  } from "typings/custom";
13
13
 
14
+ import { DateTime } from "luxon";
15
+
14
16
  export default class FormattedDateTime extends LightningElement {
15
17
  @api weekday: formattedDateWeekday;
16
18
  @api year: formattedDateYear;
@@ -27,7 +29,11 @@ export default class FormattedDateTime extends LightningElement {
27
29
  return;
28
30
  }
29
31
 
30
- this._unformattedDate = new Date(value);
32
+ this._unformattedDate = DateTime.fromISO(value)
33
+ .plus({
34
+ hour: 1
35
+ })
36
+ .toJSDate();
31
37
 
32
38
  if (this._unformattedDate.toString() === "Invalid Date") {
33
39
  // this is a fix for Safari since it doesn't support date strings with 'yyyy/mm/dd' patterns
@@ -62,7 +68,7 @@ export default class FormattedDateTime extends LightningElement {
62
68
  }
63
69
 
64
70
  getOptions() {
65
- const options = {
71
+ return {
66
72
  weekday: this.weekday || undefined,
67
73
  year: this.year || undefined,
68
74
  month: this.month || undefined,
@@ -70,8 +76,8 @@ export default class FormattedDateTime extends LightningElement {
70
76
  hour: this.hour || undefined,
71
77
  minute: this.minute || undefined,
72
78
  second: this.second,
73
- timeZoneName: this.timeZoneName || undefined
79
+ timeZoneName: this.timeZoneName || undefined,
80
+ timeZone: "America/Los_Angeles"
74
81
  };
75
- return options;
76
82
  }
77
83
  }