File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ const base = filePath.slice(lastSlashIndex + 1);
1717// Create a variable to store the ext part of the variable
1818
1919const firstSlashIndex = filePath . indexOf ( "/" ) ;
20- const dir = filePath . slice ( firstSlashIndex + 1 , lastSlashIndex + 1 ) ;
20+ const dir = filePath . slice ( firstSlashIndex , lastSlashIndex ) ;
2121
2222const lastdotindex = filePath . lastIndexOf ( "." ) ;
2323const ext = filePath . slice ( lastdotindex ) ;
Original file line number Diff line number Diff line change 55
66// the times are in the wrong places ie:-20:53 is not a twelve hour time and as they are const they cant be directly changed
77
8- let twelveHourClockTime = "13. 00" ;
8+ let twelveHourClockTime = "13: 00" ;
99let twelthHour = twelveHourClockTime . substring (
1010 0 ,
1111 twelveHourClockTime . length - 3
@@ -15,7 +15,7 @@ let twelthHour = twelveHourClockTime.substring(
1515let sufix = ".AM"
1616
1717
18- if ( twelthHour => 13 ) {
18+ if ( twelthHour >= 13 ) {
1919 twelthHour = twelthHour - 12 ;
2020 sufix = ".PM"
2121
@@ -26,7 +26,7 @@ let twelthMinutes = twelveHourClockTime.substring(
2626) ;
2727
2828
29- let twentyFourHourClockTime = "08:53.pm " ;
29+ let twentyFourHourClockTime = "04:59.am " ;
3030let twentyFour = twentyFourHourClockTime . substring ( 0 ,
3131 twentyFourHourClockTime . length - 6 )
3232 twentyFour = parseInt ( twentyFour ) ;
You can’t perform that action at this time.
0 commit comments