You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would be a proposal, not an issue, but i wasn't sure on where to put it.
The proposal is to implement a createFromFormat($format, $time) constructor for CarbonInterval as Carbon object already has, this to better handle MySQL (and others DBMS) time data type or other string representations of time intervals.
It is tedious to use a long
Carboninterval::create(0, 0, 0, 0, 1, 30, 0, 0)
or even a
Carboninterval::hours(1)->minutes(30)
since i have to split the original string into several variables, and eventyally calculate days, weeks and so on.
It would be more readable and user friendly something like
Carboninterval::createFromFormat('H:i', '1:30')
The text was updated successfully, but these errors were encountered:
This would be a proposal, not an issue, but i wasn't sure on where to put it.
The proposal is to implement a
createFromFormat($format, $time)
constructor forCarbonInterval
asCarbon
object already has, this to better handle MySQL (and others DBMS)time
data type or other string representations of time intervals.It is tedious to use a long
or even a
since i have to split the original string into several variables, and eventyally calculate days, weeks and so on.
It would be more readable and user friendly something like
The text was updated successfully, but these errors were encountered: