In a microflow, if you have variables ToDate and FromDate, you can write an XPath constraint like:
[DateAttribute >= FromDate]
[DateAttribute <= ToDate]
In the user interface (e.g. on a DataGrid widget), you can use tokens like [%MonthLength%] – see the documentation here.