Skip to content

Commit

Permalink
feat: 날짜 컨버터 util 클래스
Browse files Browse the repository at this point in the history
  • Loading branch information
dgjinsu committed Nov 10, 2024
1 parent 83e374d commit 469bd45
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/main/java/jikgong/global/utils/DateConverter.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package jikgong.global.utils;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;

public class DateConverter {

public static LocalDate convertToLocalDate(String dateString) {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd");
return LocalDate.parse(dateString, formatter);
}
}

0 comments on commit 469bd45

Please sign in to comment.