Skip to content

Commit

Permalink
[feat] 날짜 시간 출력 함수 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryeolee committed May 10, 2024
1 parent 4967463 commit caf70b8
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ public String parsingDotDate(Date date){
SimpleDateFormat format = new SimpleDateFormat("yy.MM.dd");
return format.format(date);
}


public static String parsingDotDateTime(LocalDateTime date){
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yy.MM.dd HH:mm");
return date.format(formatter);
}
public int calculateDay(Date startDate, Date endDate) {
long differenceMillis = endDate.getTime() - startDate.getTime();
long differenceDays = differenceMillis / (1000 * 60 * 60 * 24);
Expand Down

0 comments on commit caf70b8

Please sign in to comment.