Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Calculate the remaining days on view Laravel, negative days if date has passed

//If you want to get the negative values, you would need to pass false as the second parameter of the diffInDays function.

CarbonCarbon::now()->diffInDays($patient->date_end, false)
  
//The second parameter sets whether you want the absolute difference or not. Default is true, which returns absolute difference.
 
PREVIOUS NEXT
Tagged: #Calculate #remaining #days #view #negative #days #date #passed
ADD COMMENT
Topic
Name
4+4 =