Skip to content

Commit

Permalink
#998: QuarterData with dependency to quarter_lib
Browse files Browse the repository at this point in the history
  • Loading branch information
clean-coder committed Sep 19, 2024
1 parent 27e8799 commit 0bd6eb2
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
6 changes: 6 additions & 0 deletions backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@
<version>3.25.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.puzzle.okr</groupId>
<artifactId>quarter_lib</artifactId>
<version>2.0.136-SNAPSHOT</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
50 changes: 50 additions & 0 deletions backend/src/test/java/ch/puzzle/okr/util/QuarterData.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package ch.puzzle.okr.util;

import ch.puzzle.quarter.generate.h2.QuarterFunction;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class QuarterData {

private static final Logger logger = LoggerFactory.getLogger(QuarterData.class);

public static void initQuarterData() {
QuarterFunction.initQuarterData();
}

public static String currentQuarterLabel() {
String label = QuarterFunction.currentQuarterLabel();
logger.warn("currentQuarterLabel : " + label);
return label;
}

public static String currentQuarterStartDate() {
String start = QuarterFunction.currentQuarterStartDate();
logger.warn("currentQuarterStartDate: " + start);
return start;
}

public static String currentQuarterEndDate() {
String end = QuarterFunction.currentQuarterEndDate();
logger.warn("currentQuarterEndDate : " + end);
return end;
}

public static String nextQuarterLabel() {
String label = QuarterFunction.nextQuarterLabel();
logger.warn("nextQuarterLabel : " + label);
return label;
}

public static String nextQuarterStartDate() {
String start = QuarterFunction.nextQuarterStartDate();
logger.warn("nextQuarterStartDate : " + start);
return start;
}

public static String nextQuarterEndDate() {
String end = QuarterFunction.nextQuarterEndDate();
logger.warn("nextQuarterEndDate : " + end);
return end;
}
}

0 comments on commit 0bd6eb2

Please sign in to comment.