메소드 |
설명 |
|
__construct ( string $time = null, string | DateTimeZon\DateTimeZone $timezone = null ) : Date |
Returns new DateTime object. |
|
add ( string | DateInterva\DateInterval $interval ) : Date |
Adds an amount of days, months, years, hours, minutes and seconds to a Date object. |
|
ago ( Date $since = null, boolean $absolute = false ) : string |
Alias for diffForHumans. |
|
createFromFormat ( string $format, string $time, DateTimeZon\DateTimeZone | string $timezone = null ) : static |
Create a Carbon instance from a specific format. |
|
diffForHumans ( Carbon\Carbon $since = null, boolean $absolute = false, $short = false ) : string |
Get the difference in a human readable format. |
|
format ( string $format ) : string |
Returns date formatted according to given or predefined format. |
|
getFallbackLocale ( ) : string |
Get the fallback locale. |
|
getLocale ( ) : string |
Get the current translator locale. |
|
getTranslator ( ) : Translator |
Return the Translator implementation. |
|
make ( string $time = null, string | DateTimeZon\DateTimeZone $timezone = null ) : Date |
Create and return new Date instance. |
|
parse ( string $time = null, string | DateTimeZon\DateTimeZone $timezone = null ) : Date |
Create a carbon instance from a string. |
|
setFallbackLocale ( string $locale ) : void |
Set the fallback locale. |
|
setLocale ( string $locale ) : void |
Set the current locale. |
|
setTranslator ( Symfony\Component\Translation\TranslatorInterface $translator ) |
Set the Translator implementation. |
|
sub ( string | DateInterva\DateInterval $interval ) : Date |
Subtracts an amount of days, months, years, hours, minutes and seconds from a DateTime object. |
|
timespan ( Date $time = null, string | DateTimeZon\DateTimeZone $timezone = null ) : integer |
Gets the timespan between this date and another date. |
|
translateTimeString ( string $time ) : string |
Translate a locale based time string to its english equivalent. |
|
until ( Date $since = null ) : string |
Alias for diffForHumans. |
|