Limit number of entries - per week - parameters for 'week'

In regards to ‘limit the number of entries’ > ‘per week’ - is the ‘week’ related to the default wordpress setting e.g. ‘week starts on’ Wednesday, or does this setting default to Monday to Monday or Sunday to Monday etc.

Any help is appreciated

Here are the way in which each of this time frames are defined:

GFFormDisplay::get_limit_period_dates()
switch ( $period ) {
    case 'day':
        return array(
            'start_date' => current_time( 'Y-m-d' ),
            'end_date'   => current_time( 'Y-m-d 23:59:59' ),
        );
        break;

    case 'week':
        return array(
            'start_date' => gmdate( 'Y-m-d', strtotime( 'Monday this week' ) ),
            'end_date'   => gmdate( 'Y-m-d 23:59:59', strtotime( 'Sunday this week' ) ),
        );
        break;

    case 'month':
        $month_start = gmdate( 'Y-m-1');
        return array(
            'start_date' => $month_start,
            'end_date'   => gmdate( 'Y-m-d H:i:s', strtotime( "{$month_start} +1 month -1 second" ) ),
        );
        break;

    case 'year':
        return array(
            'start_date' => gmdate( 'Y-1-1' ),
            'end_date'   => gmdate( 'Y-12-31 23:59:59' ),
        );
        break;
}

It’s showing Monday to Sunday when Week is selected.

The plugin GP Limit Submissions by Gravity Wiz should give you more granular control over this.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.