php - Writing for holes in ranges -


i'm trying write program relies on date ranges. trying able alert users when there holes in ranges need reliable way find those, , able handle them effectively.

my solution change dates day inserted app rewritten day @ noon. here code that:

    public function reformdate($date){         return strtotime(date("f j, y", $date)." 12:00pm");     } 

this allow me deal more regular , consistent dataset. because had see how many days apart, rather seeing how many seconds apart , making decision whether time quantity represented intentional gap or not...

i saw, however, when put in today @ noon, if put tomorrow @ noon, since values same, , based on restriction:

select * times :date between start , end 

it triggers response. solution this add 1 start variable, , detract 1 end variable, can check if there overlap asking if difference between start of 1 , end of more 2.

anyway, question is: way this? i'm particularly worried number 2 - need worry using such small units of time (that unix time, way). alternately, should create test if 2 time units overlap - should accepted?


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -