Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Leap Approaches overview #2208

Merged
merged 1 commit into from
Jan 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading