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)
Count0.9.6

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

Read more

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close