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 13, 2018

Verified

This commit was signed with the committer’s verified signature.
frapell Franco Pellegrini
1 parent 567fef7 commit fc3c9e3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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());
}

/**
@@ -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. */

0 comments on commit fc3c9e3

Please sign in to comment.