@@ -3,12 +3,12 @@ const currentDateTimeUtcText = document.getElementById("currentDateTimeUtc");
33const currentProgressText = document . getElementById ( "currentProgress" ) ;
44const currentDateTime = new Date ( ) ;
55const currentUtcDateTime = new Date (
6- currentDateTime . getUTCFullYear ( ) ,
7- currentDateTime . getUTCMonth ( ) ,
8- currentDateTime . getUTCDate ( ) ,
9- currentDateTime . getUTCHours ( ) ,
10- currentDateTime . getUTCMinutes ( ) ,
11- currentDateTime . getUTCSeconds ( ) ,
6+ currentDateTime . getUTCFullYear ( ) ,
7+ currentDateTime . getUTCMonth ( ) ,
8+ currentDateTime . getUTCDate ( ) ,
9+ currentDateTime . getUTCHours ( ) ,
10+ currentDateTime . getUTCMinutes ( ) ,
11+ currentDateTime . getUTCSeconds ( ) ,
1212) ;
1313currentDateTimeText . textContent = `${ currentDateTime . toLocaleString ( ) } ` ;
1414currentDateTimeUtcText . textContent = `${ currentDateTime . toUTCString ( ) } ` ;
@@ -42,101 +42,101 @@ const dayStartUtc = new Date(currentUtcYear, currentUtcMonth, currentUtcDate);
4242const dayEndUtc = new Date ( currentUtcYear , currentUtcMonth , currentUtcDate + 1 ) ;
4343const hourStart = new Date ( currentYear , currentMonth , currentDate , currentHour ) ;
4444const hourEnd = new Date (
45- currentYear ,
46- currentMonth ,
47- currentDate ,
48- currentHour + 1 ,
45+ currentYear ,
46+ currentMonth ,
47+ currentDate ,
48+ currentHour + 1 ,
4949) ;
5050const hourStartUtc = new Date (
51- currentUtcYear ,
52- currentUtcMonth ,
53- currentUtcDate ,
54- currentUtcHour ,
51+ currentUtcYear ,
52+ currentUtcMonth ,
53+ currentUtcDate ,
54+ currentUtcHour ,
5555) ;
5656const hourEndUtc = new Date (
57- currentUtcYear ,
58- currentUtcMonth ,
59- currentUtcDate ,
60- currentUtcHour + 1 ,
57+ currentUtcYear ,
58+ currentUtcMonth ,
59+ currentUtcDate ,
60+ currentUtcHour + 1 ,
6161) ;
6262const minuteStart = new Date (
63- currentYear ,
64- currentMonth ,
65- currentDate ,
66- currentHour ,
67- currentMinute ,
63+ currentYear ,
64+ currentMonth ,
65+ currentDate ,
66+ currentHour ,
67+ currentMinute ,
6868) ;
6969const minuteEnd = new Date (
70- currentYear ,
71- currentMonth ,
72- currentDate ,
73- currentHour ,
74- currentMinute + 1 ,
70+ currentYear ,
71+ currentMonth ,
72+ currentDate ,
73+ currentHour ,
74+ currentMinute + 1 ,
7575) ;
7676const minuteStartUtc = new Date (
77- currentUtcYear ,
78- currentUtcMonth ,
79- currentUtcDate ,
80- currentUtcHour ,
81- currentUtcMinute ,
77+ currentUtcYear ,
78+ currentUtcMonth ,
79+ currentUtcDate ,
80+ currentUtcHour ,
81+ currentUtcMinute ,
8282) ;
8383const minuteEndUtc = new Date (
84- currentUtcYear ,
85- currentUtcMonth ,
86- currentUtcDate ,
87- currentUtcHour ,
88- currentUtcMinute + 1 ,
84+ currentUtcYear ,
85+ currentUtcMonth ,
86+ currentUtcDate ,
87+ currentUtcHour ,
88+ currentUtcMinute + 1 ,
8989) ;
9090const secondStart = new Date (
91- currentYear ,
92- currentMonth ,
93- currentDate ,
94- currentHour ,
95- currentMinute ,
96- currentSecond ,
91+ currentYear ,
92+ currentMonth ,
93+ currentDate ,
94+ currentHour ,
95+ currentMinute ,
96+ currentSecond ,
9797) ;
9898const secondEnd = new Date (
99- currentYear ,
100- currentMonth ,
101- currentDate ,
102- currentHour ,
103- currentMinute ,
104- currentSecond + 1 ,
99+ currentYear ,
100+ currentMonth ,
101+ currentDate ,
102+ currentHour ,
103+ currentMinute ,
104+ currentSecond + 1 ,
105105) ;
106106const secondStartUtc = new Date (
107- currentUtcYear ,
108- currentUtcMonth ,
109- currentUtcDate ,
110- currentUtcHour ,
111- currentUtcMinute ,
112- currentUtcSecond ,
107+ currentUtcYear ,
108+ currentUtcMonth ,
109+ currentUtcDate ,
110+ currentUtcHour ,
111+ currentUtcMinute ,
112+ currentUtcSecond ,
113113) ;
114114const secondEndUtc = new Date (
115- currentUtcYear ,
116- currentUtcMonth ,
117- currentUtcDate ,
118- currentUtcHour ,
119- currentUtcMinute ,
120- currentUtcSecond + 1 ,
115+ currentUtcYear ,
116+ currentUtcMonth ,
117+ currentUtcDate ,
118+ currentUtcHour ,
119+ currentUtcMinute ,
120+ currentUtcSecond + 1 ,
121121) ;
122122const yearProgress = ( currentDateTime - yearStart ) / ( yearEnd - yearStart ) ;
123123const yearProgressUtc =
124- ( currentUtcDateTime - yearStartUtc ) / ( yearEndUtc - yearStartUtc ) ;
124+ ( currentUtcDateTime - yearStartUtc ) / ( yearEndUtc - yearStartUtc ) ;
125125const monthProgress = ( currentDateTime - monthStart ) / ( monthEnd - monthStart ) ;
126126const monthProgressUtc =
127- ( currentUtcDateTime - monthStartUtc ) / ( monthEndUtc - monthStartUtc ) ;
127+ ( currentUtcDateTime - monthStartUtc ) / ( monthEndUtc - monthStartUtc ) ;
128128const dayProgress = ( currentDateTime - dayStart ) / ( dayEnd - dayStart ) ;
129129const dayProgressUtc =
130- ( currentUtcDateTime - dayStartUtc ) / ( dayEndUtc - dayStartUtc ) ;
130+ ( currentUtcDateTime - dayStartUtc ) / ( dayEndUtc - dayStartUtc ) ;
131131const hourProgress = ( currentDateTime - hourStart ) / ( hourEnd - hourStart ) ;
132132const hourProgressUtc =
133- ( currentUtcDateTime - hourStartUtc ) / ( hourEndUtc - hourStartUtc ) ;
133+ ( currentUtcDateTime - hourStartUtc ) / ( hourEndUtc - hourStartUtc ) ;
134134const minuteProgress =
135- ( currentDateTime - minuteStart ) / ( minuteEnd - minuteStart ) ;
135+ ( currentDateTime - minuteStart ) / ( minuteEnd - minuteStart ) ;
136136const minuteProgressUtc =
137- ( currentUtcDateTime - minuteStartUtc ) / ( minuteEndUtc - minuteStartUtc ) ;
137+ ( currentUtcDateTime - minuteStartUtc ) / ( minuteEndUtc - minuteStartUtc ) ;
138138const secondProgress =
139- ( currentDateTime - secondStart ) / ( secondEnd - secondStart ) ;
139+ ( currentDateTime - secondStart ) / ( secondEnd - secondStart ) ;
140140const secondProgressUtc =
141- ( currentUtcDateTime - secondStartUtc ) / ( secondEndUtc - secondStartUtc ) ;
141+ ( currentUtcDateTime - secondStartUtc ) / ( secondEndUtc - secondStartUtc ) ;
142142currentProgressText . textContent = `Year progress: ${ yearProgress } (${ yearProgressUtc } )\nMonth progress: ${ monthProgress } (${ monthProgressUtc } )\nDay progress: ${ dayProgress } (${ dayProgressUtc } )\nHour progress: ${ hourProgress } (${ hourProgressUtc } )\nMinute progress: ${ minuteProgress } (${ minuteProgressUtc } )\nSecond progress: ${ secondProgress } (${ secondProgressUtc } )` ;
0 commit comments