Flagsmith / Flagsmith/flagsmith

Epic: Allow date comparisons in segment rules

Open
#3,971 17 comments 0 reactions 0 assignees View on GitHub
api improvement sdk
Dominant language
Python
Stars
6.6k
Forks
567
Avg merge
1d 13h
Merged PRs (30d)
121

Description

### 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`, where `some_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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.