Skip to content

Commit

Permalink
feat: update date formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Kang1221 committed Sep 2, 2024
1 parent 69311a8 commit 3412a93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/co/orange/ddanzi/service/OrderService.java
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ private void createOrderOptionDetails(Order order, List<Long> optionDetailIds){

private String createOrderId(String itemId){
String uploadDatePart = itemId.substring(itemId.length() - 8, itemId.length() - 2);
LocalDate uploadDate = LocalDate.parse(uploadDatePart, DateTimeFormatter.ofPattern("yyyyMMdd"));
LocalDate uploadDate = LocalDate.parse(uploadDatePart, DateTimeFormatter.ofPattern("yyMMdd"));

LocalDate currentDate = LocalDate.now();
long daysBetween = java.time.temporal.ChronoUnit.DAYS.between(uploadDate, currentDate);
Expand Down

0 comments on commit 3412a93

Please sign in to comment.