-
Notifications
You must be signed in to change notification settings - Fork 25
strftime + strfmon #45
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
…ase. implemented time.h and time.c
…as well and added a main to time.c which gets timestamp and calls all functions.
… working besides the one in time.c/main()
merge strfmon into main
…to use. and revised my stupid comment in time.c
|
I will code review this |
1 similar comment
|
I will code review this |
|
Verification After testing it locally, I found that both functions compile successfully and behave as expected Testing Code Walkthrough
Suggestions for improvement: Formatting Checklist:
Code Checks:
|
|
Good job with your documentation! Testing also went well for me. I will have to say that I agree with the other code review that you could have more error handling to account for edge cases such as non-numeric inputs, but I will give you the check mark anyways because you did account for almost all edge cases :-) However, your code kind of has a lot of unused/commented out code and I noticed that you guys left todo comments in the repo (specifically time.c). I think if you remove all this unused code + finished todos you’ll be all set in terms of keeping your code organized and maintainable. High Level Checks:
Code Checks:
|
|
Verification: Both strftime and strfmon worked for me when i tested with the generic inputs that we were assigned by default and produced the output as described in the docs. Testing: Testing was very simple with thorough instructions on how to run both programs with example inputs and outputs of what we should get to confirm whether our testing resulted in correct or incorrect results. Code Walkthrough: Honestly while testing both strftime and strfmon I barely ran into any error or edge cases besides what was already stated with non numerical numbers which I didn't really test. Your documentation was clear and consise on exactly how to run each test this time by hard coding either strfmon or strftime then we can run either montest or timeTest. Formatting: For the most part the formatting was well defined and consistent although there were a few todo comments in time.c and commented out code. Also in time.c comments were consistent and helpful to understand what everything was doing, I especially found the longer comments to be helpful in understanding exactly what was suppose to happen during certain sections of your code. High Level Checks:
Code Checks:
|
|
This looks good. I think the reviewers above have some good suggestions regarding cleaning this up a bit. I like that you implemented a separate time header for this. One thing I am not a fan of is that one of these functions is now part of ulib.c while the other is not. Ideally these should be in one place, and even more ideally there should be a 4.75/5 |
strftime and strfmon
This pull request implements two new functions to the user library, strftime and strfmon. Both of these involve formatting a string according to certain conversion specifications. Documentation for each of these functions, as well as build and testing instructions, can be found in docs/strftime.md and docs/strfmon.md.