Quantcast
Viewing latest article 13
Browse Latest Browse All 60

Get Last four week (start and end date)

get current date

$custom_date = strtotime( date('Y-m-d') );

Last week date on Monday and Sunday.

$week_start1 = date('Ymd', strtotime('last week last monday', $custom_date));
$week_end1 = date('Ymd', strtotime('last week next sunday', $custom_date));

Second Last week date on Monday and Sunday.

$week_start2 = date('Ymd', strtotime('last week last monday -7 days', $custom_date));
$week_end2 = date('Ymd', strtotime('last week next sunday -7 days', $custom_date));

Third Last week date on Monday and Sunday.

$week_start3 = date('Ymd', strtotime('last week last monday -14 days', $custom_date));
$week_end3 = date('Ymd', strtotime('last week next sunday -14 days', $custom_date));

Fourth Last week date on Monday and Sunday.

$week_start4 = date('Ymd', strtotime('last week last monday -21 days', $custom_date));
$week_end4 = date('Ymd', strtotime('last week next sunday -21 days', $custom_date));


Filed under: PHP Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.

Viewing latest article 13
Browse Latest Browse All 60

Trending Articles