From c647134b148ec45e15ca37ae0625218c7cae9dfc Mon Sep 17 00:00:00 2001 From: BahaaMohamed98 Date: Sun, 8 Jun 2025 21:07:47 +0300 Subject: [PATCH 1/2] Fix typo in datetime concept --- concepts/datetime/about.md | 2 +- concepts/datetime/introduction.md | 2 +- exercises/concept/booking-up-for-beauty/.docs/introduction.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/concepts/datetime/about.md b/concepts/datetime/about.md index 2724d5cdb..468ae079b 100644 --- a/concepts/datetime/about.md +++ b/concepts/datetime/about.md @@ -47,7 +47,7 @@ These methods return a _new_ `LocalDate` instance and do not update the existing ```java LocalDate date = LocalDate.of(2007, 12, 3); -date.addDays(3); +date.plusDays(3); // => 2007-12-06 date.addMonths(1); diff --git a/concepts/datetime/introduction.md b/concepts/datetime/introduction.md index afb15b114..2b9513189 100644 --- a/concepts/datetime/introduction.md +++ b/concepts/datetime/introduction.md @@ -41,7 +41,7 @@ These methods return a _new_ `LocalDate` instance and do not update the existing ```java LocalDate date = LocalDate.of(2007, 12, 3); -date.addDays(3); +date.plusDays(3); // => 2007-12-06 ``` diff --git a/exercises/concept/booking-up-for-beauty/.docs/introduction.md b/exercises/concept/booking-up-for-beauty/.docs/introduction.md index 2baa59e0f..ed132331c 100644 --- a/exercises/concept/booking-up-for-beauty/.docs/introduction.md +++ b/exercises/concept/booking-up-for-beauty/.docs/introduction.md @@ -43,7 +43,7 @@ These methods return a _new_ `LocalDate` instance and do not update the existing ```java LocalDate date = LocalDate.of(2007, 12, 3); -date.addDays(3); +date.plusDays(3); // => 2007-12-06 ``` From 541827be1934535a58c528f5ae3da50cd03a9299 Mon Sep 17 00:00:00 2001 From: BahaaMohamed98 Date: Sun, 8 Jun 2025 21:25:07 +0300 Subject: [PATCH 2/2] Fix addMonths and addYears to plusMonths and plusYears in datetime concept --- concepts/datetime/about.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/concepts/datetime/about.md b/concepts/datetime/about.md index 468ae079b..8ab1fbad6 100644 --- a/concepts/datetime/about.md +++ b/concepts/datetime/about.md @@ -50,10 +50,10 @@ LocalDate date = LocalDate.of(2007, 12, 3); date.plusDays(3); // => 2007-12-06 -date.addMonths(1); +date.plusMonths(1); // => 2008-01-03 -date.addYears(1); +date.plusYears(1); // => 2008-12-03 ```