-
Notifications
You must be signed in to change notification settings - Fork 334
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
allow date comparisons in segment rules #3971
Comments
Can i take this up? |
Hi @utkarsh-1905 , this is quite a large amount of work as it will need to be implemented in the engine code in all of our server side SDKs. If you're willing to take all of that on, then great, yes! In terms of the design for this, I think we will need some new operators to ensure that the engine knows when to correctly format the value as a date. When these operators are chosen in the UI, it should provide a date picker to select from. |
Yes, I am willing to take this up, in turn this will help me to understand the codebase better, so I can contribute more in the future, though I will ask a lot of doubts here 😅 |
We need to give consideration here to timezones too? |
Hmm... yes, I guess we either need the dates to always be TZ aware or always NOT TZ aware (and hence we assume UTC). We perhaps needs to do some research into what other feature flagging / analytics tools are doing in this regard to get some inspiration. @utkarsh-1905 could you take a look? |
Sure I will |
Is your feature request related to a problem? Please describe.
I would like to be able to do date comparisons on a trait in a way that is easy for non-technical users to configure.
Describe the solution you'd like.
New rule operators that allow for date comparison, e.g.
some_trait [before | on | after] YYYY-MM-DD
, wheresome_trait
could be an ISO-formatted date string, epoch time, or some other format (doesn't really matter). In terms of impl, would probably just be a wrapper around numeric comparison with epoch time.Describe alternatives you've considered
This is currently possible with numeric comparison if we use epoch time on both sides. However, it would be a nice QOL feature (especially for non-technical users) if we didn't have to do the conversion or think about epoch time at all.
Additional context
No response
The text was updated successfully, but these errors were encountered: