-
Notifications
You must be signed in to change notification settings - Fork 167
convert_time_from_24-hour_to_12-hour_format rust program #4789
Conversation
@SaideepKondur is attempting to deploy a commit to the Codinasion Team on Vercel. A member of the Team first needs to authorize it. |
@harshraj8843 It is asking for vercel authorization to approve. Could you kindly look into it and provide me with any leads to approve the merge |
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.
Enhance time conversion and add input validation
@SaideepKondur, the current implementation of the time conversion program is almost correct, such as the accurate conversion of valid 24-hour input to the 12-hour format. However, there are a couple of areas where input validation is lacking.
Positive Aspects:
- Accurate conversion of valid 24-hour input to 12-hour format.
- Proper determination of AM or PM.
The program should validate:
- Validate that the parsed hour is between 0 and 23.
- Validate that the parsed minute is between 0 and 59.
- Validate that the parsed second is between 0 and 59.
This ensures that only valid 24-hour time formats are accepted, preventing errors like "10203:123:3232" from being processed.
@SaideepKondur, please review and update the required changes. Feel free to reach out if you have any questions or if further adjustments are needed.
|
validated hours, minutes and seconds format in Rust program to convert time from 24-hour to 12-hour format
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.
validated hours, minutes and seconds format in Rust program to convert time from 24-hour to 12-hour format
@0ME9A I have validated hours, minutes and seconds format in Rust program to convert time from 24-hour to 12-hour format. I have changed the previous file. Kindly have a look and let me know if any changes are required. Do consider merging it. Thank you |
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.
Hats off to @SaideepKondur for an exceptional job on resolving Issue #3220! 🎉 I'm truly impressed with the code quality and the effective solution provided. Your attention to detail and commitment to excellence shine through. 👏 This is a significant contribution that greatly enhances our project.
Thanks a million for your dedication and hard work!
Best,
@0ME9A
Thanks a lot @0ME9A. @grraghav120 kindly approve the merge since merging requires 2 approving reviews. And also Vercel is asking for authorization. |
Added Haskell program to print numbers from 1 to n without using a loop #3742.
Happy 😊 |
@0ME9A Yes!!!, Thanks a lot 😊 |
📑 Description
I've added a Rust program that converts time from 24-hour to 12-hour format. The user is prompted to input the time in the 24-hour format (HH:MM:SS), and the program outputs the time in the 12-hour format, including AM or PM.
Here's an example of the conversion:
Input: 12:05:45
Output: 12:05:45PM
The solution utilizes standard input/output for user interaction and performs the conversion logic in Rust.
🐞 Related Issue
Closes #3220