Skip to content

Conversation

@shade5144
Copy link
Contributor

Features

  • d and t options for testing
  • Greenwich Mean Time supported
  • Added documentation

Misc Changes

  • Relocated Format_State struct definition to include/printf.h

user/datetime.c Outdated
Comment on lines 16 to 18
// Number of seconds in a year: 31556926
// Number of seconds in a month: 2629743
// Number of seconds in a day: 86400
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make this a little more explicit, it would be better to define them as constants rather than magic numbers. I will be updating that for you :)

Copy link
Member

@chrisdedman chrisdedman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

}

// Function to getline from user input
void getlines(char *restrict buffer, size_t length)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this getlines function could be simplified by adding modularity. This would help with improving readability. This is okay for now, but I will probably refactor it in the future.

@chrisdedman chrisdedman merged commit 08c3781 into sandbox-science:main May 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants