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

When a end or start date is just YYYY, date comparisons fails #5

Closed
jpgoldberg opened this issue Nov 15, 2023 · 2 comments
Closed

When a end or start date is just YYYY, date comparisons fails #5

jpgoldberg opened this issue Nov 15, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@jpgoldberg
Copy link
Contributor

This is pointing out that #4 is not fully resolved by release https://github.com/sinaatalay/rendercv/releases/tag/v0.7

Describe the bug

It appears that when checking that an end_date is not before a start_date when one of the dates is YYYY, we end up with an attempt to compare in int with a date

ERROR | '>' not supported between instances of 'datetime.date' and 'int'

To Reproduce

Include in the input yaml, something like

 - institution: Stanford University
      url: https://stanford.edu
      area: Linguistics
      study_type: PhD (not completed)
      location: Stanford, California, USA
      start_date: "1984-09"
      end_date: "1987"

Comments

Whatever trick is used to get something like 1984-09 to be a valid datetime.date should be used for YYYY. I haven't looked at the source to see how you manage that.

@jpgoldberg jpgoldberg added the bug Something isn't working label Nov 15, 2023
@jpgoldberg
Copy link
Contributor Author

Fixing the parsing is easy, but we don't want a YYYY date to render as "Jan. YYYY".

So I believe a fix will require extending or wrapping the Date class.

sinaatalay added a commit that referenced this issue Nov 16, 2023
@sinaatalay
Copy link
Owner

Hello, I solved the problem by adding some ifs to the code. Although it's not the best solution, it should suffice for our current needs as we do not plan to use more advanced "date" functionalities. I plan to release the new version tomorrow. Thanks for finding this.

jpgoldberg pushed a commit to jpgoldberg/rendercv that referenced this issue Nov 27, 2023
jpgoldberg pushed a commit to jpgoldberg/rendercv that referenced this issue Nov 27, 2023
sinaatalay pushed a commit that referenced this issue Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants