-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
SearchKit - Add next_birthday calc field #25740
Conversation
(Standard links)
|
@colemanw I feel like as soon as we add this people will want the actual date (e.g to include in a calendar) - would it be hard to add that too? |
@eileenmcnaughton you can already get the birth month and the birth day using field transformations, and you could put them together in a single field using rewrite. Or you could use rewrite plus a smarty date formatter to leave off the year. |
OK - well this is useful - we can worry about the other if it arises - I still think the field re-write for a feed is harder than it might appear as you can't just combine date+month + this year - cos it might be next year |
Yea actually it will be every year. I'm not quite sure how you do that with a cal feed, but I guess generating one for this year and one for next year is pretty good. |
@jensschuppe Glad I didn't refactor birthday reports :D Thanks @colemanw ! |
@colemanw Thanks again for this quick and wonderful answer. You made my day :-)
Peter |
Glad it's working for you @WebmasterBouclier, thanks for testing. |
Overview
Adds a calculated field to make it easy to perform "upcoming birthday" searches.
Before
Could not create "upcoming birthday" searches in SearchKit.
After
Technical Details
This field returns an integer from 0 (birthday is today) to 364 (birthday was yesterday). Or maybe on leap years that would be 365.