Documentation

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 monthDate minus (-) 1 month
last day of -1 monthDate minus (-) 1 month > last day of that month
-2 daysDate minus (-) 2 days
-2 weeksDate minus (-) 2 weeks (two weeks ago)
2 weeks agoDate minus (-) 2 weeks (two weeks ago)
-3 weekdaysDate minus (-) 3 weekdays (skips the weekend)
Countv0.9.8

For this plugin you need to install the free GravityWP - Count from the WordPress repository.

Read more