Skip to content

Commit

Permalink
resolved test case Date.getYear()
Browse files Browse the repository at this point in the history
  • Loading branch information
Praful Makani committed Nov 12, 2018
1 parent ebbeac0 commit a7cdc38
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public static LocalDate toDate(Date date){
* @return Date
*/
public static Date toDate(LocalDate date){
return new Date(date.getDayOfYear(), date.getMonthValue(), date.getDayOfMonth());
return new Date(date.getYear(), date.getMonthValue(), date.getDayOfMonth());
}

/**
Expand All @@ -100,7 +100,7 @@ public static LocalDate fromDate(Date date){
* @return Date
*/
public static Date fromDate(LocalDate date){
return new Date(date.getDayOfYear(), date.getMonthValue(), date.getDayOfMonth());
return new Date(date.getYear(), date.getMonthValue(), date.getDayOfMonth());
}

/** Returns the year. */
Expand Down

0 comments on commit a7cdc38

Please sign in to comment.