-
Notifications
You must be signed in to change notification settings - Fork 71
Program completes #68
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
base: main
Are you sure you want to change the base?
Conversation
chrisjamiecarter
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟢 Validation
😆 Less than 8 hours! Very optimistic, love it!
| return dateTime; | ||
| } | ||
|
|
||
| public static bool OrderValidator(Exercise lastShift, DateTime newStartTime) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟠 Shift
❓ Shift or Exercise?
| 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"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟠 Shift
❓ Shift?
|
@anaclos P.S., Please can you close this PR? |
|
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: ***@***.***>
|
No description provided.