Skip to content
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

support for parsing date string with only time #65

Merged
merged 1 commit into from
Mar 3, 2024

Conversation

matrixhead
Copy link
Contributor

@matrixhead matrixhead commented Mar 3, 2024

Hi, i was trying to fix the date-sec test case in gnu test coverage in coreutils-date and i figured if i could make parse_datetime to take strings with only time and offset it would fix the issue and from the code I figured you guys are already working on a parser but as a temporary fix i wrote the following code to deal with the issue. Please do let me know if this not the way it was supposed to be implemented or any kind of change at all. Thank you

Copy link

codecov bot commented Mar 3, 2024

Codecov Report

Attention: Patch coverage is 92.06349% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 68.30%. Comparing base (83e1431) to head (249c079).
Report is 58 commits behind head on main.

Files Patch % Lines
src/lib.rs 0.00% 2 Missing and 1 partial ⚠️
src/parse_time_only_str.rs 96.66% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #65      +/-   ##
==========================================
+ Coverage   64.97%   68.30%   +3.32%     
==========================================
  Files           3        6       +3     
  Lines         454      795     +341     
  Branches       93      188      +95     
==========================================
+ Hits          295      543     +248     
- Misses        111      130      +19     
- Partials       48      122      +74     
Flag Coverage Δ
macos_latest 68.30% <92.06%> (+3.32%) ⬆️
ubuntu_latest 67.29% <90.47%> (+2.31%) ⬆️
windows_latest 7.61% <9.52%> (-60.36%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tertsdiepraam
Copy link
Member

tertsdiepraam commented Mar 3, 2024

I'd have to look into this, but I wouldn't mind merging this as a temporary solution indeed. I'll have to continue my work on the new parser. Looks useful to have in the meantime!

@matrixhead
Copy link
Contributor Author

thanks 😄, i think i fixed the clippy and fmt errors is there anything else i should do?

Copy link
Member

@tertsdiepraam tertsdiepraam left a comment

Choose a reason for hiding this comment

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

Nope, looks pretty good!

@tertsdiepraam tertsdiepraam merged commit 96d8c7c into uutils:main Mar 3, 2024
16 checks passed
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