Skip to content

Commit 1f6a0a3

Browse files
Further correction exercise 2-time-format
1 parent 5329549 commit 1f6a0a3

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎Sprint-2/3-mandatory-interpret/2-time-format.js‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const movieLength = 90000; // length of movie in seconds
1+
const movieLength = 90.5; // length of movie in seconds
22

33
const remainingSeconds = movieLength % 60;
44
const totalMinutes = (movieLength - remainingSeconds) / 60;
@@ -63,10 +63,11 @@ console.log(result);
6363
/* movieLength = -3600 => exactMoveLenght = -1:0:0 */
6464
/* movieLength = 90000 => exactMoveLenght = 25:0:0 */
6565
/* */
66-
/* This code work Could be better: */
66+
/* This code Could be better: */
6767
/* - giving a negative value for movieLength will result in a negative clock: so there could have message that reject negative numbers. */
6868
/* - The program should have represented Hours/Min/Sec in this format 00:00:00 so each time should be represented with 2 digits. */
6969
/* - 25 hours exeeds 24 hours which represents a day so a variable total days could be added to represent time in days. */
70+
/* -Values with dicimal numbers will return the clock showing dicimal numbers this should be rounded up or down to the nearst time with an integer number */
7071
/* */
7172
/**********************************************************************************************************************************************************/
7273

0 commit comments

Comments
 (0)