Skip to content

Commit

Permalink
Demonstrate that unrelated String are also changed
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek committed Jun 29, 2023
1 parent 1677986 commit 167ef5e
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ void worksWithYYUses() {
class Test {
public void formatDate() {
String unrelated = "HEYY";
Date date = new SimpleDateFormat("yy/MM/dd").parse("2015/12/31");
String result = DateTimeFormatter.ofPattern("YY/MM/dd").format(date.toInstant());
}
Expand All @@ -121,6 +122,7 @@ public void formatDate() {
class Test {
public void formatDate() {
String unrelated = "HEYY";
Date date = new SimpleDateFormat("yy/MM/dd").parse("2015/12/31");
String result = DateTimeFormatter.ofPattern("yy/MM/dd").format(date.toInstant());
}
Expand Down

0 comments on commit 167ef5e

Please sign in to comment.