Skip to content

Commit

Permalink
MODDCB-119 Change the datatype of calendar startDate and endDate (#99)
Browse files Browse the repository at this point in the history
* MODDCB-119 Change the datatype of calendar startDate and endDate
  • Loading branch information
Vignesh-kalyanasundaram authored Oct 1, 2024
1 parent 28ef066 commit 28536f5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,8 @@ private void createCalendarIfNotExists() {
log.info("createCalendarIfNotExists:: calendar with name {} doesn't exists, so creating new calendar", DCB_CALENDAR_NAME);
Calendar newCalendar = Calendar.builder()
.name(DCB_CALENDAR_NAME)
.startDate(LocalDate.now())
.endDate(LocalDate.now().plusYears(10))
.startDate(LocalDate.now().toString())
.endDate(LocalDate.now().plusYears(10).toString())
.normalHours(List.of(NormalHours.builder()
.startDay(DayOfWeek.SUNDAY.name())
.startTime(LocalTime.of(0, 0).toString())
Expand Down
2 changes: 0 additions & 2 deletions src/main/resources/swagger.api/schemas/Calendar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ Calendar:
type: string
startDate:
type: string
format: date
description: The first effective date (inclusive, YYYY-MM-DD) of this calendar
endDate:
type: string
format: date
description: The first effective date (inclusive, YYYY-MM-DD) of this calendar
assignments:
description: A list of all service points that this calendar is assigned to
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/folio/dcb/utils/EntityUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ public static TransactionAuditEntity createTransactionAuditEntity(){
public static CalendarCollection getCalendarCollection(String calendarName) {
var calendar = Calendar.builder()
.name(calendarName)
.startDate(LocalDate.now())
.endDate(LocalDate.now().plusYears(10))
.startDate(LocalDate.now().toString())
.endDate(LocalDate.now().plusYears(10).toString())
.assignments(new ArrayList<>())
.build();
var calendarCollection = new CalendarCollection();
Expand Down

0 comments on commit 28536f5

Please sign in to comment.