Skip to content

Commit

Permalink
Update Leap Approaches overview (#2208)
Browse files Browse the repository at this point in the history
This makes the article more readable in the UI.
  • Loading branch information
iHiD authored Jan 4, 2024
1 parent a1523c1 commit ebb4ec7
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions exercises/practice/leap/.approaches/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,11 @@ For more information, check the [`switch` on a `tuple` approach][approach-switch

## Other approaches

Besides the aforementioned, idiomatic approaches, you could also approach the exercise as follows:

## DateTime.Add approach:

Add a day to February 28th for the year and see if the new day is the 29th. For more information, see the [`DateTime.Add` approach][approach-datetime-add].

## Built-in method approach:

Use the built-in method for the year. For more information, see the [`DateTime.IsLeapYear` approach][approach-datetime-isleapyear].
Besides the aforementioned, idiomatic approaches, you could also solve the exercise by:
- Adding a day to February 28th seeing if the new day is the 29th.
For more information, see the [`DateTime.Add` approach][approach-datetime-add].
- Using the built-in method for the year.
For more information, see the [`DateTime.IsLeapYear` approach][approach-datetime-isleapyear].

## Which approach to use?

Expand Down

0 comments on commit ebb4ec7

Please sign in to comment.