Skip to content

Commit

Permalink
#998: add QuarterData
Browse files Browse the repository at this point in the history
  • Loading branch information
clean-coder committed Sep 23, 2024
1 parent 19a50a1 commit 4af8695
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 @@ -92,6 +92,12 @@
<version>1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.puzzle.okr</groupId>
<artifactId>quarter_lib</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
50 changes: 50 additions & 0 deletions backend/src/main/java/ch/puzzle/okr/utilX/QuarterData.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package ch.puzzle.okr.utilX;

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 4af8695

Please sign in to comment.