0

I have a little issue, I'm trying to calculate date difference, for now I'm using carbon. I want to calculate date difference excluding few given dates. Anyone has an idea how to do it?

Cheers!

Maarduk
  • 246
  • 4
  • 17
  • 1
    Does this answer your question? [Calculate difference between two dates using Carbon and Blade](https://stackoverflow.com/questions/39508963/calculate-difference-between-two-dates-using-carbon-and-blade) – xNoJustice Aug 14 '20 at 12:30
  • https://github.com/spatie/period is good for complex date stuff. – Tarek Adam Aug 14 '20 at 12:43
  • It depends the unit of your difference, for "day", then `diffInDaysFiltered()` is enough (details in the Carbon doc: https://carbon.nesbot.com/docs/#api-difference). For more precise hour/minute difference, or to handle more specifically holidays, https://github.com/kylekatarnls/business-time will be a better fit. So you should provide more details (like an example of input-output) in your question. – KyleK Aug 19 '20 at 14:48

0 Answers0