Implement Lookups
Would it be possible to implement lookups for the database, so that .filter(birthday__yearlessdate_gte=(YearlessDate(12, 9)))
Note: I use a modified version of your code to have a dayless-date, so it might be possible that my examples/code snippets don't match with the intended usage.
Hi and thanks for the issue request!
Offhand I would have thought this already works, but happy to consider a PR for this!
So yesterday I had the idea to just an IntergerField, which has lookups already included.
Looking at your code reveals that your fields use CharFields: https://github.com/seddonym/django-yearlessdate/blob/4a0c2803f9a418c20a32d478d2f7fd749f96e7bd/djangoyearlessdate/models.py#L44
In my case I directly inherited from models.IntegerField and format my 'dayless-date' in %Y%m.
Looking at your code reveals that your fields use CharFields.
They do indeed!
Sounds like you sorted out your issue?
I did, yes, actually, but lookups will work without any further changes if we use IntergerField as parent class, so this might be the way for this package as well.