Skip to content

Commit

Permalink
MAT-7570: Update the QDM Date Shift lower limit to 1900.
Browse files Browse the repository at this point in the history
  • Loading branch information
jkotanchik-SB committed Aug 29, 2024
1 parent 245b1d5 commit 648c00c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>gov.cms.madie</groupId>
<artifactId>madie-java-models</artifactId>
<version>0.6.59-SNAPSHOT</version>
<version>0.6.60-SNAPSHOT</version>
<name>madie-java-models</name>
<description>Java based models for MADiE microservices</description>
<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ public ZonedDateTime shiftDateByYear(ZonedDateTime dateTime, int year) {
if (shiftedDateTime.getYear() > 9999) {
return shiftedDateTime.withYear(9999);
}
if (shiftedDateTime.getYear() < 0) {
return shiftedDateTime.withYear(0);
if (shiftedDateTime.getYear() < 1900) {
return shiftedDateTime.withYear(1900);
}
return shiftedDateTime;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ void shiftDateByYearBeforeYear0() {
ZonedDateTime dateTime = ZonedDateTime.ofInstant(Instant.now(), ZoneId.of("UTC"));
encounterPerformed.setAuthorDatetime(dateTime);
ZonedDateTime shiftedDateTime = encounterPerformed.shiftDateByYear(dateTime, -100000);
assertThat(shiftedDateTime).isEqualTo(dateTime.withYear(0));
assertThat(shiftedDateTime).isEqualTo(dateTime.withYear(1900));
}
}

0 comments on commit 648c00c

Please sign in to comment.