DateFactory
class DateFactory (View source)
Constants
DEFAULT_CLASS_NAME |
The default class that will be used for all created dates. |
Properties
static protected string | $dateClass | The type (class) of dates that should be created. |
|
static protected callable | $callable | This callable may be used to intercept date creation. |
|
static protected object | $factory | The Carbon factory that should be used when creating dates. |
Methods
Use the given handler when generating dates (class name, callable, or factory).
Use the default date class when generating dates.
Execute the given callable on each date creation.
Use the given date type (class) when generating dates.
Use the given Carbon factory when generating dates.
Handle dynamic calls to generate dates.
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Details
static mixed
use(mixed $handler)
Use the given handler when generating dates (class name, callable, or factory).
static void
useDefault()
Use the default date class when generating dates.
static void
useCallable(callable $callable)
Execute the given callable on each date creation.
static void
useClass(string $dateClass)
Use the given date type (class) when generating dates.
static void
useFactory(object $factory)
Use the given Carbon factory when generating dates.
mixed
__call(string $method, array $parameters)
Handle dynamic calls to generate dates.
Carbon
create(mixed $year, mixed $month, mixed $day, mixed $hour, mixed $minute, mixed $second, mixed $tz)
No description
Carbon
createFromDate(mixed $year, mixed $month, mixed $day, mixed $tz)
No description
Carbon|false
createFromFormat(mixed $format, mixed $time, mixed $tz)
No description
Carbon
createFromTime(mixed $hour, mixed $minute, mixed $second, mixed $tz)
No description
Carbon
createFromTimeString(mixed $time, mixed $tz)
No description
Carbon
createFromTimestamp(mixed $timestamp, mixed $tz)
No description
Carbon
createFromTimestampMs(mixed $timestamp, mixed $tz)
No description
Carbon
createFromTimestampUTC(mixed $timestamp)
No description
Carbon
createMidnightDate(mixed $year, mixed $month, mixed $day, mixed $tz)
No description
Carbon|false
createSafe(mixed $year, mixed $month, mixed $day, mixed $hour, mixed $minute, mixed $second, mixed $tz)
No description
void
disableHumanDiffOption(mixed $humanDiffOption)
No description
void
enableHumanDiffOption(mixed $humanDiffOption)
No description
mixed
executeWithLocale(mixed $locale, mixed $func)
No description
Carbon
fromSerialized(mixed $value)
No description
array
getAvailableLocales()
No description
array
getDays()
No description
int
getHumanDiffOptions()
No description
array
getIsoUnits()
No description
array
getLastErrors()
No description
string
getLocale()
No description
int
getMidDayAt()
No description
Carbon|null
getTestNow()
No description
TranslatorInterface
getTranslator()
No description
int
getWeekEndsAt()
No description
int
getWeekStartsAt()
No description
array
getWeekendDays()
No description
bool
hasFormat(mixed $date, mixed $format)
No description
bool
hasMacro(mixed $name)
No description
bool
hasRelativeKeywords(mixed $time)
No description
bool
hasTestNow()
No description
Carbon
instance(mixed $date)
No description
bool
isImmutable()
No description
bool
isModifiableUnit(mixed $unit)
No description
bool
isMutable()
No description
bool
isStrictModeEnabled()
No description
bool
localeHasDiffOneDayWords(mixed $locale)
No description
bool
localeHasDiffSyntax(mixed $locale)
No description
bool
localeHasDiffTwoDayWords(mixed $locale)
No description
bool
localeHasPeriodSyntax(mixed $locale)
No description
bool
localeHasShortUnits(mixed $locale)
No description
void
macro(mixed $name, mixed $macro)
No description
Carbon|null
make(mixed $var)
No description
Carbon
maxValue()
No description
Carbon
minValue()
No description
void
mixin(mixed $mixin)
No description
Carbon
now(mixed $tz)
No description
Carbon
parse(mixed $time, mixed $tz)
No description
string
pluralUnit(string $unit)
No description
void
resetMonthsOverflow()
No description
void
resetToStringFormat()
No description
void
resetYearsOverflow()
No description
void
serializeUsing(mixed $callback)
No description
void
setHumanDiffOptions(mixed $humanDiffOptions)
No description
bool
setLocale(mixed $locale)
No description
void
setMidDayAt(mixed $hour)
No description
void
setTestNow(mixed $testNow)
No description
void
setToStringFormat(mixed $format)
No description
void
setTranslator(TranslatorInterface $translator)
No description
void
setUtf8(mixed $utf8)
No description
void
setWeekEndsAt(mixed $day)
No description
void
setWeekStartsAt(mixed $day)
No description
void
setWeekendDays(mixed $days)
No description
bool
shouldOverflowMonths()
No description
bool
shouldOverflowYears()
No description
string
singularUnit(string $unit)
No description
Carbon
today(mixed $tz)
No description
Carbon
tomorrow(mixed $tz)
No description
void
useMonthsOverflow(mixed $monthsOverflow)
No description
void
useStrictMode(mixed $strictModeEnabled)
No description
void
useYearsOverflow(mixed $yearsOverflow)
No description
Carbon
yesterday(mixed $tz)
No description