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

Add a new `date` field that abstracts over `day`, `month`, and `year` and allows date queries #2872

Open
jones1008 opened this issue Apr 8, 2018 · 3 comments
Labels

Comments

@jones1008
Copy link

@jones1008 jones1008 commented Apr 8, 2018

In some cases it would be useful to use date and date range querys with the year tag.

So a query like:
beet list 'added:-5y..'
would also be useful with the year tag:
beet list 'year:-5y..'
This query would list all tracks from the last 5 years.
It is more dynamic than those:

beet list 'year:2013..2018'
beet list 'year:2013..'

Any thoughts on that?

@sampsyo sampsyo added the needinfo label Apr 8, 2018
@sampsyo

This comment has been minimized.

Copy link
Member

@sampsyo sampsyo commented Apr 8, 2018

Interesting! What do you think about a slightly refined proposal: we create a virtual (i.e., computed) field called date that includes the information from the year, month, and day fields that get stored in files' metadata? This field would work the same way as added or mtime and support these queries, but year itself would remain a plain integer.

@jones1008

This comment has been minimized.

Copy link
Author

@jones1008 jones1008 commented Apr 8, 2018

This sounds more solid than my version!
Very good!

@sampsyo sampsyo changed the title feature request: date range querys for the field 'year' Add a new `date` field that abstracts over `day`, `month`, and `year` and allows date queries Apr 8, 2018
@sampsyo sampsyo added feature and removed needinfo labels Apr 8, 2018
@sampsyo

This comment has been minimized.

Copy link
Member

@sampsyo sampsyo commented Apr 8, 2018

OK, this is a good idea. Thanks for the suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.