Relative date filter
Since version 0.9.7 it’s possible to use relative dates to filter the count result.
Relative start_date and end_date
You can use relative dates in the start_date and end_date argument in the gravitywp_count shortcode. For example this shortcode will return how many entries where submitted in Form ID 1 in between 4 months and 1 month ago.
[gravitywp_count formid='1' start_date="-4 months" end_date="-1 months"]
Relative date options
Check out the documentation on Relative Formats on php.net. We’ll give you some examples here.
-1 month | Date minus (-) 1 month |
last day of -1 month | Date minus (-) 1 month > last day of that month |
-2 days | Date minus (-) 2 days |
-2 weeks | Date minus (-) 2 weeks (two weeks ago) |
2 weeks ago | Date minus (-) 2 weeks (two weeks ago) |
-3 weekdays | Date minus (-) 3 weekdays (skips the weekend) |