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

Group qualifier not implemented #12

Closed
mbklein opened this issue Jan 27, 2025 · 1 comment · Fixed by #14
Closed

Group qualifier not implemented #12

mbklein opened this issue Jan 27, 2025 · 1 comment · Fixed by #14
Assignees
Labels
bug Something isn't working

Comments

@mbklein
Copy link
Collaborator

mbklein commented Jan 27, 2025

Level 2 Group Qualification isn't working correctly. When the qualifier comes before an element, it applies only to that element. When the qualifier comes after the element, it applies to all elements to the left.

Expected:

iex(1)> EDTF.parse("1978?-02-23/1978?-02-24")
{:ok,
 %EDTF.Interval{
   start: %EDTF.Date{
     type: :date,
     values: [1978, 1, 23],
     level: 0,
     attributes: [uncertain: 15]
   },
   end: %EDTF.Date{
     type: :date,
     values: [1978, 1, 24],
     level: 0,
     attributes: [uncertain: 15]
   },
   level: 2
 }}

Actual:

iex(1)> EDTF.parse("1978?-02-23/1978?-02-24")
{:error, :invalid_format}
@mbklein mbklein self-assigned this Jan 27, 2025
@mbklein mbklein added the bug Something isn't working label Jan 27, 2025
@mbklein
Copy link
Collaborator Author

mbklein commented Jan 27, 2025

Fixed by #14

@mbklein mbklein closed this as completed Jan 27, 2025
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

Successfully merging a pull request may close this issue.

1 participant