fable 3.0.80 → 3.0.82
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/dist/fable.compatible.js +3 -2
- package/dist/fable.compatible.min.js +1 -1
- package/dist/fable.compatible.min.js.map +1 -1
- package/dist/fable.js +3 -2
- package/dist/fable.min.js +1 -1
- package/dist/fable.min.js.map +1 -1
- package/package.json +1 -1
- package/source/services/Fable-Service-Utility.js +10 -1
- package/test/Utility_tests.js +1 -0
package/package.json
CHANGED
|
@@ -120,6 +120,14 @@ class FableServiceUtility extends libFableServiceBase
|
|
|
120
120
|
// Track the number of minutes we need to adjust the date by based on the timezone.
|
|
121
121
|
let tmpTimeZoneOffsetInMinutes = 0;
|
|
122
122
|
|
|
123
|
+
// This fixes an inconsistency with constructing the date programmatically.
|
|
124
|
+
tmpReturnDate.setUTCDate(1);
|
|
125
|
+
tmpReturnDate.setUTCMonth(1);
|
|
126
|
+
tmpReturnDate.setUTCHours(0);
|
|
127
|
+
tmpReturnDate.setUTCMinutes(0);
|
|
128
|
+
tmpReturnDate.setUTCSeconds(0);
|
|
129
|
+
tmpReturnDate.setUTCMilliseconds(0);
|
|
130
|
+
|
|
123
131
|
// Manually parse the parts of the string and set each part for the
|
|
124
132
|
// date. Note: Using the UTC versions of these functions is necessary
|
|
125
133
|
// because we're manually adjusting for time zones stored in the
|
|
@@ -128,7 +136,8 @@ class FableServiceUtility extends libFableServiceBase
|
|
|
128
136
|
|
|
129
137
|
// The month numbers are one "off" from what normal humans would expect
|
|
130
138
|
// because January == 0.
|
|
131
|
-
tmpReturnDate.setUTCMonth( parseInt( tmpDateParts[ 1 ] - 1 )
|
|
139
|
+
tmpReturnDate.setUTCMonth( parseInt( tmpDateParts[ 1 ] ) - 1 );
|
|
140
|
+
|
|
132
141
|
tmpReturnDate.setUTCDate( parseInt( tmpDateParts[ 2 ] ) );
|
|
133
142
|
|
|
134
143
|
// Set the time parts of the date object.
|
package/test/Utility_tests.js
CHANGED
|
@@ -207,6 +207,7 @@ suite
|
|
|
207
207
|
Expect(testFable.services.Utility.isoStringToDate('1986-06-11T09:34:46.012Z').getTime()).to.equal(518866486012);
|
|
208
208
|
Expect(testFable.services.Utility.isoStringToDate('1986-06-11T09:34:46.012Z+0200').getTime()).to.equal(519586486012);
|
|
209
209
|
Expect(testFable.services.Utility.isoStringToDate('1986-06-11T09:34:46.012Z+0200').getTime()).to.equal(519586486012);
|
|
210
|
+
Expect(testFable.services.Utility.isoStringToDate('2023-02-07T21:45:00.999Z').getMonth()).to.equal(1);
|
|
210
211
|
fDone();
|
|
211
212
|
}
|
|
212
213
|
)
|