Open
Conversation
chrisjamiecarter
approved these changes
Mar 7, 2025
chrisjamiecarter
left a comment
There was a problem hiding this comment.
Hey @anaclos 👋,
Excellent work on your Exercise Tracker project submission 🎉 !
I have performed a peer review. Review/ignore any comments as you wish.
🟢 Requirements
⭐ You have fulfilled all of the project requirements!
I will go ahead and mark as approved, keep up the excellent work on the next projects! 😊
Best regards,
@chrisjamiecarter 👍
| { | ||
| TimeSpan timeSpan = end - start; | ||
| double eightHours = 3600 * 8; | ||
| return timeSpan.TotalSeconds > 0 && timeSpan.TotalSeconds <= eightHours ? true : false; |
There was a problem hiding this comment.
🟢 Validation
😆 Less than 8 hours! Very optimistic, love it!
| return dateTime; | ||
| } | ||
|
|
||
| public static bool OrderValidator(Exercise lastShift, DateTime newStartTime) |
| DateTime startTime; | ||
| DateTime endTime; | ||
|
|
||
| _userInput.ShowMessage("The new shift must be after the last shift interval. The shift interval must not exceed 8 hours. ", "blue"); |
|
@anaclos P.S., Please can you close this PR? |
Author
|
Thanks @chrisjamiecarter for taking the time to correct me. I did copy and paste in some parts, haha, that's why there are shifts and exercises. I think some people can overtrain themselves on their exercises (not me)
El viernes, 7 de marzo de 2025, 06:27:47 a. m. ART, Chris Carter ***@***.***> escribió:
@chrisjamiecarter approved this pull request.
Hey @anaclos 👋,
Excellent work on your Exercise Tracker project submission 🎉 !
I have performed a peer review. Review/ignore any comments as you wish.
🟢 Requirements
⭐ You have fulfilled all of the project requirements!
I will go ahead and mark as approved, keep up the excellent work on the next projects! 😊
Best regards,
@chrisjamiecarter 👍
In ExerciseTracker.AnaClos/ExerciseTracker/Validators/ExerciseValidator.cs:
@@ -0,0 +1,26 @@
+using ExerciseTracker.Models;
+using System.Globalization;
+
+namespace ExerciseTracker.Validators;
+
+public class ExerciseValidator
+{
+ public static bool IntervalValidator(DateTime start, DateTime end)
+ {
+ TimeSpan timeSpan = end - start;
+ double eightHours = 3600 * 8;
+ return timeSpan.TotalSeconds > 0 && timeSpan.TotalSeconds <= eightHours ? true : false;
🟢 Validation
😆 Less than 8 hours! Very optimistic, love it!
In ExerciseTracker.AnaClos/ExerciseTracker/Validators/ExerciseValidator.cs:
+{
+ public static bool IntervalValidator(DateTime start, DateTime end)
+ {
+ TimeSpan timeSpan = end - start;
+ double eightHours = 3600 * 8;
+ return timeSpan.TotalSeconds > 0 && timeSpan.TotalSeconds <= eightHours ? true : false;
+ }
+
+ public static DateTime DateTimeValidator(string date)
+ {
+ DateTime dateTime = DateTime.MinValue;
+ DateTime.TryParseExact(date, "yy/MM/dd HH:mm:ss", new CultureInfo("en-US"), DateTimeStyles.None, out dateTime);
+ return dateTime;
+ }
+
+ public static bool OrderValidator(Exercise lastShift, DateTime newStartTime)
🟠 Shift
❓ Shift or Exercise?
In ExerciseTracker.AnaClos/ExerciseTracker/Controllers/ExerciseController.cs:
+ break;
+ case "View All":
+ ViewAll();
+ break;
+ }
+ } while (option != "Exit Menu");
+ }
+
+ public void Add()
+ {
+ string startString;
+ string endString;
+ DateTime startTime;
+ DateTime endTime;
+
+ _userInput.ShowMessage("The new shift must be after the last shift interval. The shift interval must not exceed 8 hours. ", "blue");
🟠 Shift
❓ Shift?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.