File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/main/java/com/fishercoder/solutions Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ public static class Solution1 {
22
22
public int daysBetweenDates (String date1 , String date2 ) {
23
23
String [] strings1 = date1 .split ("-" );
24
24
String [] strings2 = date2 .split ("-" );
25
- return Math .abs (julianDay (Integer .parseInt (strings1 [0 ]), Integer .parseInt (strings1 [1 ]), Integer .parseInt (strings1 [2 ])) -
26
- julianDay (Integer .parseInt (strings2 [0 ]), Integer .parseInt (strings2 [1 ]), Integer .parseInt (strings2 [2 ])));
25
+ return Math .abs (julianDay (Integer .parseInt (strings1 [0 ]), Integer .parseInt (strings1 [1 ]), Integer .parseInt (strings1 [2 ]))
26
+ - julianDay (Integer .parseInt (strings2 [0 ]), Integer .parseInt (strings2 [1 ]), Integer .parseInt (strings2 [2 ])));
27
27
}
28
28
29
29
public int julianDay (int year , int month , int day ) {
You can’t perform that action at this time.
0 commit comments