๐ Leaf PHP date/time module
Repo leafsphp/date, read from GitHub 20 min ago. leafsphp has not joined Take My Repo.
diff() for whole-number differences between dates: tick($checkOut)->diff($checkIn, 'days') gives you a night count that stays correct across daylight-saving boundaries. Supports years, months, days, hours, minutes and seconds, and accepts strings, DateTime objects, or another tick() instance.tick('2026-01-15 12:00:00', 'Asia/Tokyo') means noon as experienced in Tokyo, following day.js semanticstz() to convert a date into another timezoneutc() and utcOffset() for clean UTC handling and storagetick()'s second argument now parses in that timezone instead of converting to it. For the old conversion behavior, use tick($date)->tz($timezone). Single-argument tick() calls are unaffectedtick() will no longer chain results of previous manipulationstick methodsecond methodmillisecond methodhour methodday methoddate methodmonth methodyear methodget methodset methodadd methodsubtract methodstartOf methodendOf methodformat methodfromNow methodtoNow methodisBefore methodisSame methodisAfter methodisBetween methodisBetweenOrEqual methodisSameDay methodisSameMonth methodisSameYear methodisLeapYear methodisDateTime method