Skip to content

Commit

Permalink
Merge pull request #175 from theMomentTeam/hotfix
Browse files Browse the repository at this point in the history
Hotfix
  • Loading branch information
siwony authored Jul 12, 2021
2 parents 5886d1e + fd40c83 commit 32df854
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 31 deletions.
6 changes: 0 additions & 6 deletions distribute-script.sh

This file was deleted.

6 changes: 3 additions & 3 deletions docker-compose-env.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash
echo "====mvn clean======"
mvn clean
./mvnw clean

echo "=====mvn compile====="
mvn compile
./mvnw compile

echo "======mvn package======"
mvn package
./mvnw package

echo "======docker-compose build======"
docker-compose build
Expand Down
12 changes: 0 additions & 12 deletions integrate-build-script.sh

This file was deleted.

Binary file removed keystore.p12
Binary file not shown.
22 changes: 12 additions & 10 deletions src/main/java/com/moment/the/table/service/TableService.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import org.springframework.transaction.annotation.Transactional;

import java.time.LocalDate;
import java.time.Period;
import java.time.temporal.ChronoUnit;
import java.util.List;

@Slf4j
Expand Down Expand Up @@ -44,9 +44,8 @@ public Long amountUncomfortableView(){
}

// 프로젝트 시작 이후 날짜 보여주기.
public Integer dateSinceProjectStart(){
LocalDate currentDate = LocalDate.now();
return calculateAfterDate(currentDate);
public int dateSinceProjectStart(){
return calculateAfterDate();
}

// 좋아요 수 증가.
Expand All @@ -70,14 +69,17 @@ public void cancelGood(Long boardIdx) {
}

// day 수 계산하기
public static Integer calculateAfterDate(LocalDate todayDate){
// the_moment 프로젝트 시작 날짜
LocalDate startTheMoment = LocalDate.of(2021,6,7);
public static int calculateAfterDate(){
/**
* today: 오늘 날짜
* theMomentStart: the-moment 시작 날짜
*/
LocalDate today = LocalDate.now();
LocalDate theMomentStart = LocalDate.of(2021, 6, 7);

// the_moment 프로젝트를 시작한 날짜 by 오늘의 날짜
Period period = startTheMoment.until(todayDate);
int period = (int) theMomentStart.until(today, ChronoUnit.DAYS);

// +1 을 해야 d-day 부터 1일차로 계산
return period.getDays()+1;
return period;
}
}

0 comments on commit 32df854

Please sign in to comment.