Jump to content

number between deux dates group by week


prince198

Recommended Posts

hello

i have this script

 

 

$date_start_abs=abs(strtotime(2008-01-01));
$date_end_abs=abs(strtotime(2008-01-14));
$date_start_floor=floor($date_start_abs/ 86400 ).'<br/>';
$date_fin_floor=floor($date_end_abs/ 86400 ).'<br/>';


echo $date_end_floor- $date_start_floor+1;

 

the result is  14 days

i'm looking for resuluta like this:

week 1 : 7 days;

week 2 : 7 days;

 

and aloso results without sunday

so like this

week 1: 6 days;

week 2: 6 days

 

thank you for helping

Link to comment
https://forums.phpfreaks.com/topic/113899-number-between-deux-dates-group-by-week/
Share on other sites

hello

i have this script

 

 

$date_start_abs=abs(strtotime(2008-01-01));
$date_end_abs=abs(strtotime(2008-01-14));
$date_start_floor=floor($date_start_abs/ 86400 ).'<br/>';
$date_fin_floor=floor($date_end_abs/ 86400 ).'<br/>';


echo $date_end_floor- $date_start_floor+1;

 

the result is  14 days

i'm looking for resuluta like this:

week 1 : 7 days;

week 2 : 7 days;

 

and aloso results without sunday

so like this

week 1: 6 days;

week 2: 6 days

 

thank you for helping

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.