File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -644,7 +644,7 @@ const dateTime = (function () {
644644 // the week starts on a Monday - calculate the millis for the start of the first week
645645 // millis for given 1st Jan of that year (at 00:00 UTC)
646646 const jan1 = Date . UTC ( ym . year , ym . month ) ;
647- var dayOfJan1 = ( new Date ( jan1 ) ) . getDay ( ) ;
647+ var dayOfJan1 = ( new Date ( jan1 ) ) . getUTCDay ( ) ;
648648 if ( dayOfJan1 === 0 ) {
649649 dayOfJan1 = 7 ;
650650 }
@@ -1207,8 +1207,8 @@ const dateTime = (function () {
12071207 const firstJan = Date . UTC ( components . Y , 0 ) ;
12081208 const offsetMillis = ( components . d - 1 ) * 1000 * 60 * 60 * 24 ;
12091209 const derivedDate = new Date ( firstJan + offsetMillis ) ;
1210- components . M = derivedDate . getMonth ( ) ;
1211- components . D = derivedDate . getDate ( ) ;
1210+ components . M = derivedDate . getUTCMonth ( ) ;
1211+ components . D = derivedDate . getUTCDate ( ) ;
12121212 }
12131213 if ( dateC ) {
12141214 // TODO implement this
You can’t perform that action at this time.
0 commit comments