Copy disabled (too large)
Download .txt
Showing preview only (14,574K chars total). Download the full file to get everything.
Repository: briannesbitt/Carbon
Branch: master
Commit: 4e0ab6a8b454
Files: 2034
Total size: 13.6 MB
Directory structure:
gitextract_wjayfrdi/
├── .editorconfig
├── .gitattributes
├── .github/
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE/
│ │ └── bug_report.md
│ ├── ISSUE_TEMPLATE.md
│ ├── dependabot.yml
│ └── workflows/
│ ├── deploy-documentation.yml
│ ├── documentation.yml
│ ├── laravel.yml
│ ├── phpcs.yml
│ ├── phpmd.yml
│ ├── phpstan.yml
│ ├── sponsors.yml
│ └── tests.yml
├── .gitignore
├── .php-cs-fixer.dist.php
├── .phpstorm.meta.php
├── .styleci.yml
├── LICENSE
├── bin/
│ ├── carbon
│ └── carbon.bat
├── build.php
├── codecov.yml
├── composer.json
├── contributing.md
├── extension.neon
├── lazy/
│ └── Carbon/
│ ├── MessageFormatter/
│ │ ├── MessageFormatterMapperStrongType.php
│ │ └── MessageFormatterMapperWeakType.php
│ ├── ProtectedDatePeriod.php
│ ├── TranslatorStrongType.php
│ ├── TranslatorWeakType.php
│ └── UnprotectedDatePeriod.php
├── phpdoc.php
├── phpmd.xml
├── phpstan.neon
├── phpunit.xml.dist
├── psalm.xml
├── readme.md
├── sponsors.php
├── src/
│ └── Carbon/
│ ├── AbstractTranslator.php
│ ├── Callback.php
│ ├── Carbon.php
│ ├── CarbonConverterInterface.php
│ ├── CarbonImmutable.php
│ ├── CarbonInterface.php
│ ├── CarbonInterval.php
│ ├── CarbonPeriod.php
│ ├── CarbonPeriodImmutable.php
│ ├── CarbonTimeZone.php
│ ├── Cli/
│ │ └── Invoker.php
│ ├── Constants/
│ │ ├── DiffOptions.php
│ │ ├── Format.php
│ │ ├── TranslationOptions.php
│ │ └── UnitValue.php
│ ├── Exceptions/
│ │ ├── BadComparisonUnitException.php
│ │ ├── BadFluentConstructorException.php
│ │ ├── BadFluentSetterException.php
│ │ ├── BadMethodCallException.php
│ │ ├── EndLessPeriodException.php
│ │ ├── Exception.php
│ │ ├── ImmutableException.php
│ │ ├── InvalidArgumentException.php
│ │ ├── InvalidCastException.php
│ │ ├── InvalidDateException.php
│ │ ├── InvalidFormatException.php
│ │ ├── InvalidIntervalException.php
│ │ ├── InvalidPeriodDateException.php
│ │ ├── InvalidPeriodParameterException.php
│ │ ├── InvalidTimeZoneException.php
│ │ ├── InvalidTypeException.php
│ │ ├── NotACarbonClassException.php
│ │ ├── NotAPeriodException.php
│ │ ├── NotLocaleAwareException.php
│ │ ├── OutOfRangeException.php
│ │ ├── ParseErrorException.php
│ │ ├── RuntimeException.php
│ │ ├── UnitException.php
│ │ ├── UnitNotConfiguredException.php
│ │ ├── UnknownGetterException.php
│ │ ├── UnknownMethodException.php
│ │ ├── UnknownSetterException.php
│ │ ├── UnknownUnitException.php
│ │ ├── UnreachableException.php
│ │ └── UnsupportedUnitException.php
│ ├── Factory.php
│ ├── FactoryImmutable.php
│ ├── Lang/
│ │ ├── aa.php
│ │ ├── aa_DJ.php
│ │ ├── aa_ER.php
│ │ ├── aa_ER@saaho.php
│ │ ├── aa_ET.php
│ │ ├── af.php
│ │ ├── af_NA.php
│ │ ├── af_ZA.php
│ │ ├── agq.php
│ │ ├── agr.php
│ │ ├── agr_PE.php
│ │ ├── ak.php
│ │ ├── ak_GH.php
│ │ ├── am.php
│ │ ├── am_ET.php
│ │ ├── an.php
│ │ ├── an_ES.php
│ │ ├── anp.php
│ │ ├── anp_IN.php
│ │ ├── ar.php
│ │ ├── ar_AE.php
│ │ ├── ar_BH.php
│ │ ├── ar_DJ.php
│ │ ├── ar_DZ.php
│ │ ├── ar_EG.php
│ │ ├── ar_EH.php
│ │ ├── ar_ER.php
│ │ ├── ar_IL.php
│ │ ├── ar_IN.php
│ │ ├── ar_IQ.php
│ │ ├── ar_JO.php
│ │ ├── ar_KM.php
│ │ ├── ar_KW.php
│ │ ├── ar_LB.php
│ │ ├── ar_LY.php
│ │ ├── ar_MA.php
│ │ ├── ar_MR.php
│ │ ├── ar_OM.php
│ │ ├── ar_PS.php
│ │ ├── ar_QA.php
│ │ ├── ar_SA.php
│ │ ├── ar_SD.php
│ │ ├── ar_SO.php
│ │ ├── ar_SS.php
│ │ ├── ar_SY.php
│ │ ├── ar_Shakl.php
│ │ ├── ar_TD.php
│ │ ├── ar_TN.php
│ │ ├── ar_YE.php
│ │ ├── as.php
│ │ ├── as_IN.php
│ │ ├── asa.php
│ │ ├── ast.php
│ │ ├── ast_ES.php
│ │ ├── ayc.php
│ │ ├── ayc_PE.php
│ │ ├── az.php
│ │ ├── az_AZ.php
│ │ ├── az_Arab.php
│ │ ├── az_Cyrl.php
│ │ ├── az_IR.php
│ │ ├── az_Latn.php
│ │ ├── bas.php
│ │ ├── be.php
│ │ ├── be_BY.php
│ │ ├── be_BY@latin.php
│ │ ├── bem.php
│ │ ├── bem_ZM.php
│ │ ├── ber.php
│ │ ├── ber_DZ.php
│ │ ├── ber_MA.php
│ │ ├── bez.php
│ │ ├── bg.php
│ │ ├── bg_BG.php
│ │ ├── bhb.php
│ │ ├── bhb_IN.php
│ │ ├── bho.php
│ │ ├── bho_IN.php
│ │ ├── bi.php
│ │ ├── bi_VU.php
│ │ ├── bm.php
│ │ ├── bn.php
│ │ ├── bn_BD.php
│ │ ├── bn_IN.php
│ │ ├── bo.php
│ │ ├── bo_CN.php
│ │ ├── bo_IN.php
│ │ ├── br.php
│ │ ├── br_FR.php
│ │ ├── brx.php
│ │ ├── brx_IN.php
│ │ ├── bs.php
│ │ ├── bs_BA.php
│ │ ├── bs_Cyrl.php
│ │ ├── bs_Latn.php
│ │ ├── byn.php
│ │ ├── byn_ER.php
│ │ ├── ca.php
│ │ ├── ca_AD.php
│ │ ├── ca_ES.php
│ │ ├── ca_ES_Valencia.php
│ │ ├── ca_FR.php
│ │ ├── ca_IT.php
│ │ ├── ccp.php
│ │ ├── ccp_IN.php
│ │ ├── ce.php
│ │ ├── ce_RU.php
│ │ ├── cgg.php
│ │ ├── chr.php
│ │ ├── chr_US.php
│ │ ├── ckb.php
│ │ ├── cmn.php
│ │ ├── cmn_TW.php
│ │ ├── crh.php
│ │ ├── crh_UA.php
│ │ ├── cs.php
│ │ ├── cs_CZ.php
│ │ ├── csb.php
│ │ ├── csb_PL.php
│ │ ├── cu.php
│ │ ├── cv.php
│ │ ├── cv_RU.php
│ │ ├── cy.php
│ │ ├── cy_GB.php
│ │ ├── da.php
│ │ ├── da_DK.php
│ │ ├── da_GL.php
│ │ ├── dav.php
│ │ ├── de.php
│ │ ├── de_AT.php
│ │ ├── de_BE.php
│ │ ├── de_CH.php
│ │ ├── de_DE.php
│ │ ├── de_IT.php
│ │ ├── de_LI.php
│ │ ├── de_LU.php
│ │ ├── dje.php
│ │ ├── doi.php
│ │ ├── doi_IN.php
│ │ ├── dsb.php
│ │ ├── dsb_DE.php
│ │ ├── dua.php
│ │ ├── dv.php
│ │ ├── dv_MV.php
│ │ ├── dyo.php
│ │ ├── dz.php
│ │ ├── dz_BT.php
│ │ ├── ebu.php
│ │ ├── ee.php
│ │ ├── ee_TG.php
│ │ ├── el.php
│ │ ├── el_CY.php
│ │ ├── el_GR.php
│ │ ├── en.php
│ │ ├── en_001.php
│ │ ├── en_150.php
│ │ ├── en_AG.php
│ │ ├── en_AI.php
│ │ ├── en_AS.php
│ │ ├── en_AT.php
│ │ ├── en_AU.php
│ │ ├── en_BB.php
│ │ ├── en_BE.php
│ │ ├── en_BI.php
│ │ ├── en_BM.php
│ │ ├── en_BS.php
│ │ ├── en_BW.php
│ │ ├── en_BZ.php
│ │ ├── en_CA.php
│ │ ├── en_CC.php
│ │ ├── en_CH.php
│ │ ├── en_CK.php
│ │ ├── en_CM.php
│ │ ├── en_CX.php
│ │ ├── en_CY.php
│ │ ├── en_DE.php
│ │ ├── en_DG.php
│ │ ├── en_DK.php
│ │ ├── en_DM.php
│ │ ├── en_ER.php
│ │ ├── en_FI.php
│ │ ├── en_FJ.php
│ │ ├── en_FK.php
│ │ ├── en_FM.php
│ │ ├── en_GB.php
│ │ ├── en_GD.php
│ │ ├── en_GG.php
│ │ ├── en_GH.php
│ │ ├── en_GI.php
│ │ ├── en_GM.php
│ │ ├── en_GU.php
│ │ ├── en_GY.php
│ │ ├── en_HK.php
│ │ ├── en_IE.php
│ │ ├── en_IL.php
│ │ ├── en_IM.php
│ │ ├── en_IN.php
│ │ ├── en_IO.php
│ │ ├── en_ISO.php
│ │ ├── en_JE.php
│ │ ├── en_JM.php
│ │ ├── en_KE.php
│ │ ├── en_KI.php
│ │ ├── en_KN.php
│ │ ├── en_KY.php
│ │ ├── en_LC.php
│ │ ├── en_LR.php
│ │ ├── en_LS.php
│ │ ├── en_MG.php
│ │ ├── en_MH.php
│ │ ├── en_MO.php
│ │ ├── en_MP.php
│ │ ├── en_MS.php
│ │ ├── en_MT.php
│ │ ├── en_MU.php
│ │ ├── en_MW.php
│ │ ├── en_MY.php
│ │ ├── en_NA.php
│ │ ├── en_NF.php
│ │ ├── en_NG.php
│ │ ├── en_NL.php
│ │ ├── en_NR.php
│ │ ├── en_NU.php
│ │ ├── en_NZ.php
│ │ ├── en_PG.php
│ │ ├── en_PH.php
│ │ ├── en_PK.php
│ │ ├── en_PN.php
│ │ ├── en_PR.php
│ │ ├── en_PW.php
│ │ ├── en_RW.php
│ │ ├── en_SB.php
│ │ ├── en_SC.php
│ │ ├── en_SD.php
│ │ ├── en_SE.php
│ │ ├── en_SG.php
│ │ ├── en_SH.php
│ │ ├── en_SI.php
│ │ ├── en_SL.php
│ │ ├── en_SS.php
│ │ ├── en_SX.php
│ │ ├── en_SZ.php
│ │ ├── en_TC.php
│ │ ├── en_TK.php
│ │ ├── en_TO.php
│ │ ├── en_TT.php
│ │ ├── en_TV.php
│ │ ├── en_TZ.php
│ │ ├── en_UG.php
│ │ ├── en_UM.php
│ │ ├── en_US.php
│ │ ├── en_US_Posix.php
│ │ ├── en_VC.php
│ │ ├── en_VG.php
│ │ ├── en_VI.php
│ │ ├── en_VU.php
│ │ ├── en_WS.php
│ │ ├── en_ZA.php
│ │ ├── en_ZM.php
│ │ ├── en_ZW.php
│ │ ├── eo.php
│ │ ├── es.php
│ │ ├── es_419.php
│ │ ├── es_AR.php
│ │ ├── es_BO.php
│ │ ├── es_BR.php
│ │ ├── es_BZ.php
│ │ ├── es_CL.php
│ │ ├── es_CO.php
│ │ ├── es_CR.php
│ │ ├── es_CU.php
│ │ ├── es_DO.php
│ │ ├── es_EA.php
│ │ ├── es_EC.php
│ │ ├── es_ES.php
│ │ ├── es_GQ.php
│ │ ├── es_GT.php
│ │ ├── es_HN.php
│ │ ├── es_IC.php
│ │ ├── es_MX.php
│ │ ├── es_NI.php
│ │ ├── es_PA.php
│ │ ├── es_PE.php
│ │ ├── es_PH.php
│ │ ├── es_PR.php
│ │ ├── es_PY.php
│ │ ├── es_SV.php
│ │ ├── es_US.php
│ │ ├── es_UY.php
│ │ ├── es_VE.php
│ │ ├── et.php
│ │ ├── et_EE.php
│ │ ├── eu.php
│ │ ├── eu_ES.php
│ │ ├── ewo.php
│ │ ├── fa.php
│ │ ├── fa_AF.php
│ │ ├── fa_IR.php
│ │ ├── ff.php
│ │ ├── ff_CM.php
│ │ ├── ff_GN.php
│ │ ├── ff_MR.php
│ │ ├── ff_SN.php
│ │ ├── fi.php
│ │ ├── fi_FI.php
│ │ ├── fil.php
│ │ ├── fil_PH.php
│ │ ├── fo.php
│ │ ├── fo_DK.php
│ │ ├── fo_FO.php
│ │ ├── fr.php
│ │ ├── fr_BE.php
│ │ ├── fr_BF.php
│ │ ├── fr_BI.php
│ │ ├── fr_BJ.php
│ │ ├── fr_BL.php
│ │ ├── fr_CA.php
│ │ ├── fr_CD.php
│ │ ├── fr_CF.php
│ │ ├── fr_CG.php
│ │ ├── fr_CH.php
│ │ ├── fr_CI.php
│ │ ├── fr_CM.php
│ │ ├── fr_DJ.php
│ │ ├── fr_DZ.php
│ │ ├── fr_FR.php
│ │ ├── fr_GA.php
│ │ ├── fr_GF.php
│ │ ├── fr_GN.php
│ │ ├── fr_GP.php
│ │ ├── fr_GQ.php
│ │ ├── fr_HT.php
│ │ ├── fr_KM.php
│ │ ├── fr_LU.php
│ │ ├── fr_MA.php
│ │ ├── fr_MC.php
│ │ ├── fr_MF.php
│ │ ├── fr_MG.php
│ │ ├── fr_ML.php
│ │ ├── fr_MQ.php
│ │ ├── fr_MR.php
│ │ ├── fr_MU.php
│ │ ├── fr_NC.php
│ │ ├── fr_NE.php
│ │ ├── fr_PF.php
│ │ ├── fr_PM.php
│ │ ├── fr_RE.php
│ │ ├── fr_RW.php
│ │ ├── fr_SC.php
│ │ ├── fr_SN.php
│ │ ├── fr_SY.php
│ │ ├── fr_TD.php
│ │ ├── fr_TG.php
│ │ ├── fr_TN.php
│ │ ├── fr_VU.php
│ │ ├── fr_WF.php
│ │ ├── fr_YT.php
│ │ ├── fur.php
│ │ ├── fur_IT.php
│ │ ├── fy.php
│ │ ├── fy_DE.php
│ │ ├── fy_NL.php
│ │ ├── ga.php
│ │ ├── ga_IE.php
│ │ ├── gd.php
│ │ ├── gd_GB.php
│ │ ├── gez.php
│ │ ├── gez_ER.php
│ │ ├── gez_ET.php
│ │ ├── gl.php
│ │ ├── gl_ES.php
│ │ ├── gom.php
│ │ ├── gom_Latn.php
│ │ ├── gsw.php
│ │ ├── gsw_CH.php
│ │ ├── gsw_FR.php
│ │ ├── gsw_LI.php
│ │ ├── gu.php
│ │ ├── gu_IN.php
│ │ ├── guz.php
│ │ ├── gv.php
│ │ ├── gv_GB.php
│ │ ├── ha.php
│ │ ├── ha_GH.php
│ │ ├── ha_NE.php
│ │ ├── ha_NG.php
│ │ ├── hak.php
│ │ ├── hak_TW.php
│ │ ├── haw.php
│ │ ├── he.php
│ │ ├── he_IL.php
│ │ ├── hi.php
│ │ ├── hi_IN.php
│ │ ├── hif.php
│ │ ├── hif_FJ.php
│ │ ├── hne.php
│ │ ├── hne_IN.php
│ │ ├── hr.php
│ │ ├── hr_BA.php
│ │ ├── hr_HR.php
│ │ ├── hsb.php
│ │ ├── hsb_DE.php
│ │ ├── ht.php
│ │ ├── ht_HT.php
│ │ ├── hu.php
│ │ ├── hu_HU.php
│ │ ├── hy.php
│ │ ├── hy_AM.php
│ │ ├── i18n.php
│ │ ├── ia.php
│ │ ├── ia_FR.php
│ │ ├── id.php
│ │ ├── id_ID.php
│ │ ├── ig.php
│ │ ├── ig_NG.php
│ │ ├── ii.php
│ │ ├── ik.php
│ │ ├── ik_CA.php
│ │ ├── in.php
│ │ ├── is.php
│ │ ├── is_IS.php
│ │ ├── it.php
│ │ ├── it_CH.php
│ │ ├── it_IT.php
│ │ ├── it_SM.php
│ │ ├── it_VA.php
│ │ ├── iu.php
│ │ ├── iu_CA.php
│ │ ├── iw.php
│ │ ├── ja.php
│ │ ├── ja_JP.php
│ │ ├── jgo.php
│ │ ├── jmc.php
│ │ ├── jv.php
│ │ ├── ka.php
│ │ ├── ka_GE.php
│ │ ├── kab.php
│ │ ├── kab_DZ.php
│ │ ├── kam.php
│ │ ├── kde.php
│ │ ├── kea.php
│ │ ├── khq.php
│ │ ├── ki.php
│ │ ├── kk.php
│ │ ├── kk_KZ.php
│ │ ├── kkj.php
│ │ ├── kl.php
│ │ ├── kl_GL.php
│ │ ├── kln.php
│ │ ├── km.php
│ │ ├── km_KH.php
│ │ ├── kn.php
│ │ ├── kn_IN.php
│ │ ├── ko.php
│ │ ├── ko_KP.php
│ │ ├── ko_KR.php
│ │ ├── kok.php
│ │ ├── kok_IN.php
│ │ ├── ks.php
│ │ ├── ks_IN.php
│ │ ├── ks_IN@devanagari.php
│ │ ├── ksb.php
│ │ ├── ksf.php
│ │ ├── ksh.php
│ │ ├── ku.php
│ │ ├── ku_TR.php
│ │ ├── kw.php
│ │ ├── kw_GB.php
│ │ ├── ky.php
│ │ ├── ky_KG.php
│ │ ├── lag.php
│ │ ├── lb.php
│ │ ├── lb_LU.php
│ │ ├── lg.php
│ │ ├── lg_UG.php
│ │ ├── li.php
│ │ ├── li_NL.php
│ │ ├── lij.php
│ │ ├── lij_IT.php
│ │ ├── lkt.php
│ │ ├── ln.php
│ │ ├── ln_AO.php
│ │ ├── ln_CD.php
│ │ ├── ln_CF.php
│ │ ├── ln_CG.php
│ │ ├── lo.php
│ │ ├── lo_LA.php
│ │ ├── lrc.php
│ │ ├── lrc_IQ.php
│ │ ├── lt.php
│ │ ├── lt_LT.php
│ │ ├── lu.php
│ │ ├── luo.php
│ │ ├── luy.php
│ │ ├── lv.php
│ │ ├── lv_LV.php
│ │ ├── lzh.php
│ │ ├── lzh_TW.php
│ │ ├── mag.php
│ │ ├── mag_IN.php
│ │ ├── mai.php
│ │ ├── mai_IN.php
│ │ ├── mas.php
│ │ ├── mas_TZ.php
│ │ ├── mer.php
│ │ ├── mfe.php
│ │ ├── mfe_MU.php
│ │ ├── mg.php
│ │ ├── mg_MG.php
│ │ ├── mgh.php
│ │ ├── mgo.php
│ │ ├── mhr.php
│ │ ├── mhr_RU.php
│ │ ├── mi.php
│ │ ├── mi_NZ.php
│ │ ├── miq.php
│ │ ├── miq_NI.php
│ │ ├── mjw.php
│ │ ├── mjw_IN.php
│ │ ├── mk.php
│ │ ├── mk_MK.php
│ │ ├── ml.php
│ │ ├── ml_IN.php
│ │ ├── mn.php
│ │ ├── mn_MN.php
│ │ ├── mni.php
│ │ ├── mni_IN.php
│ │ ├── mo.php
│ │ ├── mr.php
│ │ ├── mr_IN.php
│ │ ├── ms.php
│ │ ├── ms_BN.php
│ │ ├── ms_MY.php
│ │ ├── ms_SG.php
│ │ ├── mt.php
│ │ ├── mt_MT.php
│ │ ├── mua.php
│ │ ├── my.php
│ │ ├── my_MM.php
│ │ ├── mzn.php
│ │ ├── nan.php
│ │ ├── nan_TW.php
│ │ ├── nan_TW@latin.php
│ │ ├── naq.php
│ │ ├── nb.php
│ │ ├── nb_NO.php
│ │ ├── nb_SJ.php
│ │ ├── nd.php
│ │ ├── nds.php
│ │ ├── nds_DE.php
│ │ ├── nds_NL.php
│ │ ├── ne.php
│ │ ├── ne_IN.php
│ │ ├── ne_NP.php
│ │ ├── nhn.php
│ │ ├── nhn_MX.php
│ │ ├── niu.php
│ │ ├── niu_NU.php
│ │ ├── nl.php
│ │ ├── nl_AW.php
│ │ ├── nl_BE.php
│ │ ├── nl_BQ.php
│ │ ├── nl_CW.php
│ │ ├── nl_NL.php
│ │ ├── nl_SR.php
│ │ ├── nl_SX.php
│ │ ├── nmg.php
│ │ ├── nn.php
│ │ ├── nn_NO.php
│ │ ├── nnh.php
│ │ ├── no.php
│ │ ├── nr.php
│ │ ├── nr_ZA.php
│ │ ├── nso.php
│ │ ├── nso_ZA.php
│ │ ├── nus.php
│ │ ├── nyn.php
│ │ ├── oc.php
│ │ ├── oc_FR.php
│ │ ├── om.php
│ │ ├── om_ET.php
│ │ ├── om_KE.php
│ │ ├── or.php
│ │ ├── or_IN.php
│ │ ├── os.php
│ │ ├── os_RU.php
│ │ ├── pa.php
│ │ ├── pa_Arab.php
│ │ ├── pa_Guru.php
│ │ ├── pa_IN.php
│ │ ├── pa_PK.php
│ │ ├── pap.php
│ │ ├── pap_AW.php
│ │ ├── pap_CW.php
│ │ ├── pl.php
│ │ ├── pl_PL.php
│ │ ├── prg.php
│ │ ├── ps.php
│ │ ├── ps_AF.php
│ │ ├── pt.php
│ │ ├── pt_AO.php
│ │ ├── pt_BR.php
│ │ ├── pt_CH.php
│ │ ├── pt_CV.php
│ │ ├── pt_GQ.php
│ │ ├── pt_GW.php
│ │ ├── pt_LU.php
│ │ ├── pt_MO.php
│ │ ├── pt_MZ.php
│ │ ├── pt_PT.php
│ │ ├── pt_ST.php
│ │ ├── pt_TL.php
│ │ ├── qu.php
│ │ ├── qu_BO.php
│ │ ├── qu_EC.php
│ │ ├── quz.php
│ │ ├── quz_PE.php
│ │ ├── raj.php
│ │ ├── raj_IN.php
│ │ ├── rm.php
│ │ ├── rn.php
│ │ ├── ro.php
│ │ ├── ro_MD.php
│ │ ├── ro_RO.php
│ │ ├── rof.php
│ │ ├── ru.php
│ │ ├── ru_BY.php
│ │ ├── ru_KG.php
│ │ ├── ru_KZ.php
│ │ ├── ru_MD.php
│ │ ├── ru_RU.php
│ │ ├── ru_UA.php
│ │ ├── rw.php
│ │ ├── rw_RW.php
│ │ ├── rwk.php
│ │ ├── sa.php
│ │ ├── sa_IN.php
│ │ ├── sah.php
│ │ ├── sah_RU.php
│ │ ├── saq.php
│ │ ├── sat.php
│ │ ├── sat_IN.php
│ │ ├── sbp.php
│ │ ├── sc.php
│ │ ├── sc_IT.php
│ │ ├── sd.php
│ │ ├── sd_IN.php
│ │ ├── sd_IN@devanagari.php
│ │ ├── se.php
│ │ ├── se_FI.php
│ │ ├── se_NO.php
│ │ ├── se_SE.php
│ │ ├── seh.php
│ │ ├── ses.php
│ │ ├── sg.php
│ │ ├── sgs.php
│ │ ├── sgs_LT.php
│ │ ├── sh.php
│ │ ├── shi.php
│ │ ├── shi_Latn.php
│ │ ├── shi_Tfng.php
│ │ ├── shn.php
│ │ ├── shn_MM.php
│ │ ├── shs.php
│ │ ├── shs_CA.php
│ │ ├── si.php
│ │ ├── si_LK.php
│ │ ├── sid.php
│ │ ├── sid_ET.php
│ │ ├── sk.php
│ │ ├── sk_SK.php
│ │ ├── sl.php
│ │ ├── sl_SI.php
│ │ ├── sm.php
│ │ ├── sm_WS.php
│ │ ├── smn.php
│ │ ├── sn.php
│ │ ├── so.php
│ │ ├── so_DJ.php
│ │ ├── so_ET.php
│ │ ├── so_KE.php
│ │ ├── so_SO.php
│ │ ├── sq.php
│ │ ├── sq_AL.php
│ │ ├── sq_MK.php
│ │ ├── sq_XK.php
│ │ ├── sr.php
│ │ ├── sr_Cyrl.php
│ │ ├── sr_Cyrl_BA.php
│ │ ├── sr_Cyrl_ME.php
│ │ ├── sr_Cyrl_XK.php
│ │ ├── sr_Latn.php
│ │ ├── sr_Latn_BA.php
│ │ ├── sr_Latn_ME.php
│ │ ├── sr_Latn_XK.php
│ │ ├── sr_ME.php
│ │ ├── sr_RS.php
│ │ ├── sr_RS@latin.php
│ │ ├── ss.php
│ │ ├── ss_ZA.php
│ │ ├── st.php
│ │ ├── st_ZA.php
│ │ ├── sv.php
│ │ ├── sv_AX.php
│ │ ├── sv_FI.php
│ │ ├── sv_SE.php
│ │ ├── sw.php
│ │ ├── sw_CD.php
│ │ ├── sw_KE.php
│ │ ├── sw_TZ.php
│ │ ├── sw_UG.php
│ │ ├── szl.php
│ │ ├── szl_PL.php
│ │ ├── ta.php
│ │ ├── ta_IN.php
│ │ ├── ta_LK.php
│ │ ├── ta_MY.php
│ │ ├── ta_SG.php
│ │ ├── tcy.php
│ │ ├── tcy_IN.php
│ │ ├── te.php
│ │ ├── te_IN.php
│ │ ├── teo.php
│ │ ├── teo_KE.php
│ │ ├── tet.php
│ │ ├── tg.php
│ │ ├── tg_TJ.php
│ │ ├── th.php
│ │ ├── th_TH.php
│ │ ├── the.php
│ │ ├── the_NP.php
│ │ ├── ti.php
│ │ ├── ti_ER.php
│ │ ├── ti_ET.php
│ │ ├── tig.php
│ │ ├── tig_ER.php
│ │ ├── tk.php
│ │ ├── tk_TM.php
│ │ ├── tl.php
│ │ ├── tl_PH.php
│ │ ├── tlh.php
│ │ ├── tn.php
│ │ ├── tn_ZA.php
│ │ ├── to.php
│ │ ├── to_TO.php
│ │ ├── tpi.php
│ │ ├── tpi_PG.php
│ │ ├── tr.php
│ │ ├── tr_CY.php
│ │ ├── tr_TR.php
│ │ ├── ts.php
│ │ ├── ts_ZA.php
│ │ ├── tt.php
│ │ ├── tt_RU.php
│ │ ├── tt_RU@iqtelif.php
│ │ ├── twq.php
│ │ ├── tzl.php
│ │ ├── tzm.php
│ │ ├── tzm_Latn.php
│ │ ├── ug.php
│ │ ├── ug_CN.php
│ │ ├── uk.php
│ │ ├── uk_UA.php
│ │ ├── unm.php
│ │ ├── unm_US.php
│ │ ├── ur.php
│ │ ├── ur_IN.php
│ │ ├── ur_PK.php
│ │ ├── uz.php
│ │ ├── uz_Arab.php
│ │ ├── uz_Cyrl.php
│ │ ├── uz_Latn.php
│ │ ├── uz_UZ.php
│ │ ├── uz_UZ@cyrillic.php
│ │ ├── vai.php
│ │ ├── vai_Latn.php
│ │ ├── vai_Vaii.php
│ │ ├── ve.php
│ │ ├── ve_ZA.php
│ │ ├── vi.php
│ │ ├── vi_VN.php
│ │ ├── vo.php
│ │ ├── vun.php
│ │ ├── wa.php
│ │ ├── wa_BE.php
│ │ ├── wae.php
│ │ ├── wae_CH.php
│ │ ├── wal.php
│ │ ├── wal_ET.php
│ │ ├── wo.php
│ │ ├── wo_SN.php
│ │ ├── xh.php
│ │ ├── xh_ZA.php
│ │ ├── xog.php
│ │ ├── yav.php
│ │ ├── yi.php
│ │ ├── yi_US.php
│ │ ├── yo.php
│ │ ├── yo_BJ.php
│ │ ├── yo_NG.php
│ │ ├── yue.php
│ │ ├── yue_HK.php
│ │ ├── yue_Hans.php
│ │ ├── yue_Hant.php
│ │ ├── yuw.php
│ │ ├── yuw_PG.php
│ │ ├── zgh.php
│ │ ├── zh.php
│ │ ├── zh_CN.php
│ │ ├── zh_HK.php
│ │ ├── zh_Hans.php
│ │ ├── zh_Hans_HK.php
│ │ ├── zh_Hans_MO.php
│ │ ├── zh_Hans_SG.php
│ │ ├── zh_Hant.php
│ │ ├── zh_Hant_HK.php
│ │ ├── zh_Hant_MO.php
│ │ ├── zh_Hant_TW.php
│ │ ├── zh_MO.php
│ │ ├── zh_SG.php
│ │ ├── zh_TW.php
│ │ ├── zh_YUE.php
│ │ ├── zu.php
│ │ └── zu_ZA.php
│ ├── Language.php
│ ├── Laravel/
│ │ └── ServiceProvider.php
│ ├── List/
│ │ ├── languages.php
│ │ └── regions.php
│ ├── MessageFormatter/
│ │ └── MessageFormatterMapper.php
│ ├── Month.php
│ ├── PHPStan/
│ │ ├── MacroExtension.php
│ │ └── MacroMethodReflection.php
│ ├── Traits/
│ │ ├── Boundaries.php
│ │ ├── Cast.php
│ │ ├── Comparison.php
│ │ ├── Converter.php
│ │ ├── Creator.php
│ │ ├── Date.php
│ │ ├── DeprecatedPeriodProperties.php
│ │ ├── Difference.php
│ │ ├── IntervalRounding.php
│ │ ├── IntervalStep.php
│ │ ├── LocalFactory.php
│ │ ├── Localization.php
│ │ ├── Macro.php
│ │ ├── MagicParameter.php
│ │ ├── Mixin.php
│ │ ├── Modifiers.php
│ │ ├── Mutability.php
│ │ ├── ObjectInitialisation.php
│ │ ├── Options.php
│ │ ├── Rounding.php
│ │ ├── Serialization.php
│ │ ├── StaticLocalization.php
│ │ ├── StaticOptions.php
│ │ ├── Test.php
│ │ ├── Timestamp.php
│ │ ├── ToStringFormat.php
│ │ ├── Units.php
│ │ └── Week.php
│ ├── Translator.php
│ ├── TranslatorImmutable.php
│ ├── TranslatorStrongTypeInterface.php
│ ├── Unit.php
│ ├── WeekDay.php
│ └── WrapperClock.php
└── tests/
├── AbstractTestCase.php
├── AbstractTestCaseWithOldNow.php
├── Carbon/
│ ├── AddMonthsTest.php
│ ├── AddTest.php
│ ├── ArraysTest.php
│ ├── ComparisonTest.php
│ ├── ConstructTest.php
│ ├── CopyTest.php
│ ├── CreateFromDateTest.php
│ ├── CreateFromFormatTest.php
│ ├── CreateFromTimeStringTest.php
│ ├── CreateFromTimeTest.php
│ ├── CreateFromTimestampTest.php
│ ├── CreateSafeTest.php
│ ├── CreateStrictTest.php
│ ├── CreateTest.php
│ ├── DayOfWeekModifiersTest.php
│ ├── DiffTest.php
│ ├── Exceptions/
│ │ ├── BadComparisonUnitExceptionTest.php
│ │ ├── BadFluentConstructorExceptionTest.php
│ │ ├── BadFluentSetterExceptionTest.php
│ │ ├── ImmutableExceptionTest.php
│ │ ├── InvalidCastExceptionTest.php
│ │ ├── InvalidDateExceptionTest.php
│ │ ├── InvalidFormatExceptionTest.php
│ │ ├── InvalidIntervalExceptionTest.php
│ │ ├── InvalidPeriodDateExceptionTest.php
│ │ ├── InvalidPeriodParameterExceptionTest.php
│ │ ├── InvalidTimeZoneExceptionTest.php
│ │ ├── InvalidTypeExceptionTest.php
│ │ ├── NotACarbonClassExceptionTest.php
│ │ ├── NotAPeriodExceptionTest.php
│ │ ├── NotLocaleAwareExceptionTest.php
│ │ ├── OutOfRangeExceptionTest.php
│ │ ├── ParseErrorExceptionTest.php
│ │ ├── UnitExceptionTest.php
│ │ ├── UnitNotConfiguredExceptionTest.php
│ │ ├── UnknownGetterExceptionTest.php
│ │ ├── UnknownMethodExceptionTest.php
│ │ ├── UnknownSetterExceptionTest.php
│ │ ├── UnknownUnitExceptionTest.php
│ │ └── UnreachableExceptionTest.php
│ ├── ExpressiveComparisonTest.php
│ ├── Fixtures/
│ │ ├── BadIsoCarbon.php
│ │ ├── DumpCarbon.php
│ │ ├── FooBar.php
│ │ ├── Mixin.php
│ │ ├── MyCarbon.php
│ │ └── NoLocaleTranslator.php
│ ├── FluidSettersTest.php
│ ├── GenericMacroTest.php
│ ├── GettersTest.php
│ ├── InstanceTest.php
│ ├── IsTest.php
│ ├── IssetTest.php
│ ├── JsonSerializationTest.php
│ ├── LastErrorTest.php
│ ├── LocalizationTest.php
│ ├── MacroTest.php
│ ├── ModifyNearDSTChangeTest.php
│ ├── ModifyTest.php
│ ├── NowAndOtherStaticHelpersTest.php
│ ├── NowDerivativesTest.php
│ ├── ObjectsTest.php
│ ├── PhpBug72338Test.php
│ ├── RelativeDateStringTest.php
│ ├── RelativeTest.php
│ ├── RoundTest.php
│ ├── SerializationTest.php
│ ├── SetDateAndTimeFromTest.php
│ ├── SettersTest.php
│ ├── SettingsTest.php
│ ├── StartEndOfTest.php
│ ├── StrictModeTest.php
│ ├── StringsTest.php
│ ├── SubTest.php
│ ├── TestingAidsTest.php
│ └── WeekTest.php
├── CarbonImmutable/
│ ├── AddMonthsTest.php
│ ├── AddTest.php
│ ├── ArraysTest.php
│ ├── ComparisonTest.php
│ ├── ConstructTest.php
│ ├── CopyTest.php
│ ├── CreateFromDateTest.php
│ ├── CreateFromFormatTest.php
│ ├── CreateFromTimeStringTest.php
│ ├── CreateFromTimeTest.php
│ ├── CreateFromTimestampTest.php
│ ├── CreateSafeTest.php
│ ├── CreateTest.php
│ ├── DayOfWeekModifiersTest.php
│ ├── DiffTest.php
│ ├── ExpressiveComparisonTest.php
│ ├── Fixtures/
│ │ ├── BadIsoCarbon.php
│ │ ├── Mixin.php
│ │ └── MyCarbon.php
│ ├── FluidSettersTest.php
│ ├── GenericMacroTest.php
│ ├── GettersTest.php
│ ├── InstanceTest.php
│ ├── IsTest.php
│ ├── IssetTest.php
│ ├── JsonSerializationTest.php
│ ├── LastErrorTest.php
│ ├── LocalizationTest.php
│ ├── MacroTest.php
│ ├── ModifyNearDSTChangeTest.php
│ ├── ModifyTest.php
│ ├── NowAndOtherStaticHelpersTest.php
│ ├── NowDerivativesTest.php
│ ├── ObjectsTest.php
│ ├── PhpBug72338Test.php
│ ├── RelativeDateStringTest.php
│ ├── RelativeTest.php
│ ├── RoundTest.php
│ ├── SerializationTest.php
│ ├── SetDateAndTimeFromTest.php
│ ├── SetStateTest.php
│ ├── SettersTest.php
│ ├── SettingsTest.php
│ ├── StartEndOfTest.php
│ ├── StringsTest.php
│ ├── SubTest.php
│ ├── TestingAidsTest.php
│ └── WeekTest.php
├── CarbonInterval/
│ ├── AddTest.php
│ ├── AlternativeNumbersTest.php
│ ├── CascadeTest.php
│ ├── CloneTest.php
│ ├── CompareTest.php
│ ├── ComparisonTest.php
│ ├── ConstructTest.php
│ ├── CreateFromFormatTest.php
│ ├── DivideTest.php
│ ├── Fixtures/
│ │ ├── Mixin.php
│ │ ├── MixinTrait.php
│ │ └── MyCarbonInterval.php
│ ├── FloatSettersEnabledTest.php
│ ├── ForHumansTest.php
│ ├── FromStringTest.php
│ ├── GettersTest.php
│ ├── MacroTest.php
│ ├── MultiplyTest.php
│ ├── ParseFromLocaleTest.php
│ ├── RoundingTest.php
│ ├── SetStateTest.php
│ ├── SettersTest.php
│ ├── SharesTest.php
│ ├── SpecTest.php
│ ├── StrictModeTest.php
│ ├── TimesTest.php
│ ├── ToDateIntervalTest.php
│ ├── ToPeriodTest.php
│ ├── ToStringTest.php
│ └── TotalTest.php
├── CarbonPeriod/
│ ├── AliasTest.php
│ ├── CloneTest.php
│ ├── ComparisonTest.php
│ ├── CreateTest.php
│ ├── DynamicIntervalTest.php
│ ├── FilterTest.php
│ ├── Fixtures/
│ │ ├── AbstractCarbon.php
│ │ ├── CarbonPeriodFactory.php
│ │ ├── FooFilters.php
│ │ ├── MacroableClass.php
│ │ ├── Mixin.php
│ │ ├── MixinTrait.php
│ │ └── filters.php
│ ├── GettersTest.php
│ ├── IterationMethodsTest.php
│ ├── IteratorTest.php
│ ├── MacroTest.php
│ ├── RoundingTest.php
│ ├── SerializationTest.php
│ ├── SettersTest.php
│ ├── StrictModeTest.php
│ ├── ToArrayTest.php
│ ├── ToDatePeriodTest.php
│ └── ToStringTest.php
├── CarbonPeriodImmutable/
│ ├── AliasTest.php
│ ├── CloneTest.php
│ ├── ComparisonTest.php
│ ├── CreateTest.php
│ ├── DynamicIntervalTest.php
│ ├── FilterTest.php
│ ├── GettersTest.php
│ ├── IterationMethodsTest.php
│ ├── IteratorTest.php
│ ├── MacroTest.php
│ ├── RoundingTest.php
│ ├── SettersTest.php
│ ├── StrictModeTest.php
│ ├── ToArrayTest.php
│ ├── ToDatePeriodTest.php
│ └── ToStringTest.php
├── CarbonTimeZone/
│ ├── ConversionsTest.php
│ ├── CreateTest.php
│ ├── Fixtures/
│ │ └── UnknownZone.php
│ └── GettersTest.php
├── Cli/
│ ├── Cli.php
│ └── InvokerTest.php
├── CommonTraits/
│ └── MacroContextNestingTest.php
├── Doctrine/
│ └── CarbonTypesTest.php
├── Factory/
│ ├── CallbackTest.php
│ ├── FactoryTest.php
│ └── WrapperClockTest.php
├── Fixtures/
│ ├── CarbonTimezoneTrait.php
│ ├── CarbonTypeCase.php
│ ├── DateMalformedIntervalStringException.php
│ ├── DateMalformedStringException.php
│ ├── SubCarbon.php
│ ├── SubCarbonImmutable.php
│ ├── dynamicInterval.php
│ └── serialized-interval-from-v2.txt
├── Jenssegers/
│ ├── DateTest.php
│ ├── JenssegersDate.php
│ ├── TestCaseBase.php
│ ├── TranslationElTest.php
│ ├── TranslationHuTest.php
│ ├── TranslationJaTest.php
│ ├── TranslationKaTest.php
│ ├── TranslationTaTest.php
│ ├── TranslationTest.php
│ ├── TranslationThTest.php
│ └── TranslationUkTest.php
├── Language/
│ ├── LanguageTest.php
│ └── TranslatorTest.php
├── Laravel/
│ ├── App.php
│ ├── Dispatcher.php
│ ├── EventDispatcher.php
│ ├── EventDispatcherBase.php
│ ├── ServiceProvider.php
│ ├── ServiceProviderTest.php
│ ├── Translator.php
│ ├── laravel.12.x.multi-tester.yml
│ └── laravel.master.multi-tester.yml
├── Localization/
│ ├── AaDjTest.php
│ ├── AaErSaahoTest.php
│ ├── AaErTest.php
│ ├── AaEtTest.php
│ ├── AaTest.php
│ ├── AfNaTest.php
│ ├── AfTest.php
│ ├── AfZaTest.php
│ ├── AgqTest.php
│ ├── AgrPeTest.php
│ ├── AgrTest.php
│ ├── AkGhTest.php
│ ├── AkTest.php
│ ├── AmEtTest.php
│ ├── AmTest.php
│ ├── AnEsTest.php
│ ├── AnTest.php
│ ├── AnpInTest.php
│ ├── AnpTest.php
│ ├── ArAeTest.php
│ ├── ArBhTest.php
│ ├── ArDjTest.php
│ ├── ArDzTest.php
│ ├── ArEgTest.php
│ ├── ArEhTest.php
│ ├── ArErTest.php
│ ├── ArIlTest.php
│ ├── ArInTest.php
│ ├── ArIqTest.php
│ ├── ArJoTest.php
│ ├── ArKmTest.php
│ ├── ArKwTest.php
│ ├── ArLbTest.php
│ ├── ArLyTest.php
│ ├── ArMaTest.php
│ ├── ArMrTest.php
│ ├── ArOmTest.php
│ ├── ArPsTest.php
│ ├── ArQaTest.php
│ ├── ArSaTest.php
│ ├── ArSdTest.php
│ ├── ArShaklTest.php
│ ├── ArSoTest.php
│ ├── ArSsTest.php
│ ├── ArSyTest.php
│ ├── ArTdTest.php
│ ├── ArTest.php
│ ├── ArTnTest.php
│ ├── ArYeTest.php
│ ├── AsInTest.php
│ ├── AsTest.php
│ ├── AsaTest.php
│ ├── AstEsTest.php
│ ├── AstTest.php
│ ├── AycPeTest.php
│ ├── AycTest.php
│ ├── AzArabTest.php
│ ├── AzAzTest.php
│ ├── AzCyrlTest.php
│ ├── AzIrTest.php
│ ├── AzLatnTest.php
│ ├── AzTest.php
│ ├── BasTest.php
│ ├── BeByLatinTest.php
│ ├── BeByTest.php
│ ├── BeTest.php
│ ├── BemTest.php
│ ├── BemZmTest.php
│ ├── BerDzTest.php
│ ├── BerMaTest.php
│ ├── BerTest.php
│ ├── BezTest.php
│ ├── BgBgTest.php
│ ├── BgTest.php
│ ├── BhbInTest.php
│ ├── BhbTest.php
│ ├── BhoInTest.php
│ ├── BhoTest.php
│ ├── BiTest.php
│ ├── BiVuTest.php
│ ├── BmTest.php
│ ├── BnBdTest.php
│ ├── BnInTest.php
│ ├── BnTest.php
│ ├── BoCnTest.php
│ ├── BoInTest.php
│ ├── BoTest.php
│ ├── BrFrTest.php
│ ├── BrTest.php
│ ├── BrxInTest.php
│ ├── BrxTest.php
│ ├── BsBaTest.php
│ ├── BsCyrlTest.php
│ ├── BsLatnTest.php
│ ├── BsTest.php
│ ├── BynErTest.php
│ ├── BynTest.php
│ ├── CaAdTest.php
│ ├── CaEsTest.php
│ ├── CaEsValenciaTest.php
│ ├── CaFrTest.php
│ ├── CaItTest.php
│ ├── CaTest.php
│ ├── CcpInTest.php
│ ├── CcpTest.php
│ ├── CeRuTest.php
│ ├── CeTest.php
│ ├── CggTest.php
│ ├── ChrTest.php
│ ├── ChrUsTest.php
│ ├── CkbTest.php
│ ├── CmnTest.php
│ ├── CmnTwTest.php
│ ├── CrhTest.php
│ ├── CrhUaTest.php
│ ├── CsCzTest.php
│ ├── CsTest.php
│ ├── CsbPlTest.php
│ ├── CsbTest.php
│ ├── CuTest.php
│ ├── CvRuTest.php
│ ├── CvTest.php
│ ├── CyGbTest.php
│ ├── CyTest.php
│ ├── DaDkTest.php
│ ├── DaGlTest.php
│ ├── DaTest.php
│ ├── DavTest.php
│ ├── DeAtTest.php
│ ├── DeBeTest.php
│ ├── DeChTest.php
│ ├── DeDeTest.php
│ ├── DeItTest.php
│ ├── DeLiTest.php
│ ├── DeLuTest.php
│ ├── DeTest.php
│ ├── DjeTest.php
│ ├── DoiInTest.php
│ ├── DoiTest.php
│ ├── DsbDeTest.php
│ ├── DsbTest.php
│ ├── DuaTest.php
│ ├── DvMvTest.php
│ ├── DvTest.php
│ ├── DyoTest.php
│ ├── DzBtTest.php
│ ├── DzTest.php
│ ├── EbuTest.php
│ ├── EeTest.php
│ ├── EeTgTest.php
│ ├── ElCyTest.php
│ ├── ElGrTest.php
│ ├── ElTest.php
│ ├── En001Test.php
│ ├── En150Test.php
│ ├── EnAgTest.php
│ ├── EnAiTest.php
│ ├── EnAsTest.php
│ ├── EnAtTest.php
│ ├── EnAuTest.php
│ ├── EnBbTest.php
│ ├── EnBeTest.php
│ ├── EnBiTest.php
│ ├── EnBmTest.php
│ ├── EnBsTest.php
│ ├── EnBwTest.php
│ ├── EnBzTest.php
│ ├── EnCaTest.php
│ ├── EnCcTest.php
│ ├── EnChTest.php
│ ├── EnCkTest.php
│ ├── EnCmTest.php
│ ├── EnCxTest.php
│ ├── EnCyTest.php
│ ├── EnDeTest.php
│ ├── EnDgTest.php
│ ├── EnDkTest.php
│ ├── EnDmTest.php
│ ├── EnErTest.php
│ ├── EnFiTest.php
│ ├── EnFjTest.php
│ ├── EnFkTest.php
│ ├── EnFmTest.php
│ ├── EnGbTest.php
│ ├── EnGdTest.php
│ ├── EnGgTest.php
│ ├── EnGhTest.php
│ ├── EnGiTest.php
│ ├── EnGmTest.php
│ ├── EnGuTest.php
│ ├── EnGyTest.php
│ ├── EnHkTest.php
│ ├── EnIeTest.php
│ ├── EnIlTest.php
│ ├── EnImTest.php
│ ├── EnInTest.php
│ ├── EnIoTest.php
│ ├── EnIsoTest.php
│ ├── EnJeTest.php
│ ├── EnJmTest.php
│ ├── EnKeTest.php
│ ├── EnKiTest.php
│ ├── EnKnTest.php
│ ├── EnKyTest.php
│ ├── EnLcTest.php
│ ├── EnLrTest.php
│ ├── EnLsTest.php
│ ├── EnMgTest.php
│ ├── EnMhTest.php
│ ├── EnMoTest.php
│ ├── EnMpTest.php
│ ├── EnMsTest.php
│ ├── EnMtTest.php
│ ├── EnMuTest.php
│ ├── EnMwTest.php
│ ├── EnMyTest.php
│ ├── EnNaTest.php
│ ├── EnNfTest.php
│ ├── EnNgTest.php
│ ├── EnNlTest.php
│ ├── EnNrTest.php
│ ├── EnNuTest.php
│ ├── EnNzTest.php
│ ├── EnPgTest.php
│ ├── EnPhTest.php
│ ├── EnPkTest.php
│ ├── EnPnTest.php
│ ├── EnPrTest.php
│ ├── EnPwTest.php
│ ├── EnRwTest.php
│ ├── EnSbTest.php
│ ├── EnScTest.php
│ ├── EnSdTest.php
│ ├── EnSeTest.php
│ ├── EnSgTest.php
│ ├── EnShTest.php
│ ├── EnSiTest.php
│ ├── EnSlTest.php
│ ├── EnSsTest.php
│ ├── EnSxTest.php
│ ├── EnSzTest.php
│ ├── EnTcTest.php
│ ├── EnTest.php
│ ├── EnTkTest.php
│ ├── EnToTest.php
│ ├── EnTtTest.php
│ ├── EnTvTest.php
│ ├── EnTzTest.php
│ ├── EnUgTest.php
│ ├── EnUmTest.php
│ ├── EnUsPosixTest.php
│ ├── EnUsTest.php
│ ├── EnVcTest.php
│ ├── EnVgTest.php
│ ├── EnViTest.php
│ ├── EnVuTest.php
│ ├── EnWsTest.php
│ ├── EnZaTest.php
│ ├── EnZmTest.php
│ ├── EnZwTest.php
│ ├── EoTest.php
│ ├── Es419Test.php
│ ├── EsArTest.php
│ ├── EsBoTest.php
│ ├── EsBrTest.php
│ ├── EsBzTest.php
│ ├── EsClTest.php
│ ├── EsCoTest.php
│ ├── EsCrTest.php
│ ├── EsCuTest.php
│ ├── EsDoTest.php
│ ├── EsEaTest.php
│ ├── EsEcTest.php
│ ├── EsEsTest.php
│ ├── EsGqTest.php
│ ├── EsGtTest.php
│ ├── EsHnTest.php
│ ├── EsIcTest.php
│ ├── EsMxTest.php
│ ├── EsNiTest.php
│ ├── EsPaTest.php
│ ├── EsPeTest.php
│ ├── EsPhTest.php
│ ├── EsPrTest.php
│ ├── EsPyTest.php
│ ├── EsSvTest.php
│ ├── EsTest.php
│ ├── EsUsTest.php
│ ├── EsUyTest.php
│ ├── EsVeTest.php
│ ├── EtEeTest.php
│ ├── EtTest.php
│ ├── EuEsTest.php
│ ├── EuTest.php
│ ├── EwoTest.php
│ ├── FaAfTest.php
│ ├── FaIrTest.php
│ ├── FaTest.php
│ ├── FfCmTest.php
│ ├── FfGnTest.php
│ ├── FfMrTest.php
│ ├── FfSnTest.php
│ ├── FfTest.php
│ ├── FiFiTest.php
│ ├── FiTest.php
│ ├── FilPhTest.php
│ ├── FilTest.php
│ ├── FoDkTest.php
│ ├── FoFoTest.php
│ ├── FoTest.php
│ ├── FrBeTest.php
│ ├── FrBfTest.php
│ ├── FrBiTest.php
│ ├── FrBjTest.php
│ ├── FrBlTest.php
│ ├── FrCaTest.php
│ ├── FrCdTest.php
│ ├── FrCfTest.php
│ ├── FrCgTest.php
│ ├── FrChTest.php
│ ├── FrCiTest.php
│ ├── FrCmTest.php
│ ├── FrDjTest.php
│ ├── FrDzTest.php
│ ├── FrFrTest.php
│ ├── FrGaTest.php
│ ├── FrGfTest.php
│ ├── FrGnTest.php
│ ├── FrGpTest.php
│ ├── FrGqTest.php
│ ├── FrHtTest.php
│ ├── FrKmTest.php
│ ├── FrLuTest.php
│ ├── FrMaTest.php
│ ├── FrMcTest.php
│ ├── FrMfTest.php
│ ├── FrMgTest.php
│ ├── FrMlTest.php
│ ├── FrMqTest.php
│ ├── FrMrTest.php
│ ├── FrMuTest.php
│ ├── FrNcTest.php
│ ├── FrNeTest.php
│ ├── FrPfTest.php
│ ├── FrPmTest.php
│ ├── FrReTest.php
│ ├── FrRwTest.php
│ ├── FrScTest.php
│ ├── FrSnTest.php
│ ├── FrSyTest.php
│ ├── FrTdTest.php
│ ├── FrTest.php
│ ├── FrTgTest.php
│ ├── FrTnTest.php
│ ├── FrVuTest.php
│ ├── FrWfTest.php
│ ├── FrYtTest.php
│ ├── FurItTest.php
│ ├── FurTest.php
│ ├── FyDeTest.php
│ ├── FyNlTest.php
│ ├── FyTest.php
│ ├── GaIeTest.php
│ ├── GaTest.php
│ ├── GdGbTest.php
│ ├── GdTest.php
│ ├── GezErTest.php
│ ├── GezEtTest.php
│ ├── GezTest.php
│ ├── GlEsTest.php
│ ├── GlTest.php
│ ├── GomLatnTest.php
│ ├── GomTest.php
│ ├── GswChTest.php
│ ├── GswFrTest.php
│ ├── GswLiTest.php
│ ├── GswTest.php
│ ├── GuInTest.php
│ ├── GuTest.php
│ ├── GuzTest.php
│ ├── GvGbTest.php
│ ├── GvTest.php
│ ├── HaGhTest.php
│ ├── HaNeTest.php
│ ├── HaNgTest.php
│ ├── HaTest.php
│ ├── HakTest.php
│ ├── HakTwTest.php
│ ├── HawTest.php
│ ├── HeIlTest.php
│ ├── HeTest.php
│ ├── HiInTest.php
│ ├── HiTest.php
│ ├── HifFjTest.php
│ ├── HifTest.php
│ ├── HneInTest.php
│ ├── HneTest.php
│ ├── HrBaTest.php
│ ├── HrHrTest.php
│ ├── HrTest.php
│ ├── HsbDeTest.php
│ ├── HsbTest.php
│ ├── HtHtTest.php
│ ├── HtTest.php
│ ├── HuHuTest.php
│ ├── HuTest.php
│ ├── HyAmTest.php
│ ├── HyTest.php
│ ├── I18nTest.php
│ ├── IaFrTest.php
│ ├── IaTest.php
│ ├── IdIdTest.php
│ ├── IdTest.php
│ ├── IgNgTest.php
│ ├── IgTest.php
│ ├── IiTest.php
│ ├── IkCaTest.php
│ ├── IkTest.php
│ ├── InTest.php
│ ├── IsIsTest.php
│ ├── IsTest.php
│ ├── ItChTest.php
│ ├── ItItTest.php
│ ├── ItSmTest.php
│ ├── ItTest.php
│ ├── ItVaTest.php
│ ├── IuCaTest.php
│ ├── IuTest.php
│ ├── IwTest.php
│ ├── JaJpTest.php
│ ├── JaTest.php
│ ├── JgoTest.php
│ ├── JmcTest.php
│ ├── JvTest.php
│ ├── KaGeTest.php
│ ├── KaTest.php
│ ├── KabDzTest.php
│ ├── KabTest.php
│ ├── KamTest.php
│ ├── KdeTest.php
│ ├── KeaTest.php
│ ├── KhqTest.php
│ ├── KiTest.php
│ ├── KkKzTest.php
│ ├── KkTest.php
│ ├── KkjTest.php
│ ├── KlGlTest.php
│ ├── KlTest.php
│ ├── KlnTest.php
│ ├── KmKhTest.php
│ ├── KmTest.php
│ ├── KnInTest.php
│ ├── KnTest.php
│ ├── KoKpTest.php
│ ├── KoKrTest.php
│ ├── KoTest.php
│ ├── KokInTest.php
│ ├── KokTest.php
│ ├── KsInDevanagariTest.php
│ ├── KsInTest.php
│ ├── KsTest.php
│ ├── KsbTest.php
│ ├── KsfTest.php
│ ├── KshTest.php
│ ├── KuTest.php
│ ├── KuTrTest.php
│ ├── KwGbTest.php
│ ├── KwTest.php
│ ├── KyKgTest.php
│ ├── KyTest.php
│ ├── LagTest.php
│ ├── LanguagesCoverageTest.php
│ ├── LbLuTest.php
│ ├── LbTest.php
│ ├── LgTest.php
│ ├── LgUgTest.php
│ ├── LiNlTest.php
│ ├── LiTest.php
│ ├── LijItTest.php
│ ├── LijTest.php
│ ├── LktTest.php
│ ├── LnAoTest.php
│ ├── LnCdTest.php
│ ├── LnCfTest.php
│ ├── LnCgTest.php
│ ├── LnTest.php
│ ├── LoLaTest.php
│ ├── LoTest.php
│ ├── LocalizationTestCase.php
│ ├── LrcIqTest.php
│ ├── LrcTest.php
│ ├── LtLtTest.php
│ ├── LtTest.php
│ ├── LuTest.php
│ ├── LuoTest.php
│ ├── LuyTest.php
│ ├── LvLvTest.php
│ ├── LvTest.php
│ ├── LzhTest.php
│ ├── LzhTwTest.php
│ ├── MagInTest.php
│ ├── MagTest.php
│ ├── MaiInTest.php
│ ├── MaiTest.php
│ ├── MasTest.php
│ ├── MasTzTest.php
│ ├── MeTest.php
│ ├── MerTest.php
│ ├── MfeMuTest.php
│ ├── MfeTest.php
│ ├── MgMgTest.php
│ ├── MgTest.php
│ ├── MghTest.php
│ ├── MgoTest.php
│ ├── MhrRuTest.php
│ ├── MhrTest.php
│ ├── MiNzTest.php
│ ├── MiTest.php
│ ├── MiqNiTest.php
│ ├── MiqTest.php
│ ├── MjwInTest.php
│ ├── MjwTest.php
│ ├── MkMkTest.php
│ ├── MkTest.php
│ ├── MlInTest.php
│ ├── MlTest.php
│ ├── MnMnTest.php
│ ├── MnTest.php
│ ├── MniInTest.php
│ ├── MniTest.php
│ ├── MoTest.php
│ ├── MrInTest.php
│ ├── MrTest.php
│ ├── MsBnTest.php
│ ├── MsMyTest.php
│ ├── MsSgTest.php
│ ├── MsTest.php
│ ├── MtMtTest.php
│ ├── MtTest.php
│ ├── MuaTest.php
│ ├── MyMmTest.php
│ ├── MyTest.php
│ ├── MznTest.php
│ ├── NanTest.php
│ ├── NanTwLatinTest.php
│ ├── NanTwTest.php
│ ├── NaqTest.php
│ ├── NbNoTest.php
│ ├── NbSjTest.php
│ ├── NbTest.php
│ ├── NdTest.php
│ ├── NdsDeTest.php
│ ├── NdsNlTest.php
│ ├── NdsTest.php
│ ├── NeInTest.php
│ ├── NeNpTest.php
│ ├── NeTest.php
│ ├── NhnMxTest.php
│ ├── NhnTest.php
│ ├── NiuNuTest.php
│ ├── NiuTest.php
│ ├── NlAwTest.php
│ ├── NlBeTest.php
│ ├── NlBqTest.php
│ ├── NlCwTest.php
│ ├── NlNlTest.php
│ ├── NlSrTest.php
│ ├── NlSxTest.php
│ ├── NlTest.php
│ ├── NmgTest.php
│ ├── NnNoTest.php
│ ├── NnTest.php
│ ├── NnhTest.php
│ ├── NoTest.php
│ ├── NrTest.php
│ ├── NrZaTest.php
│ ├── NsoTest.php
│ ├── NsoZaTest.php
│ ├── NusTest.php
│ ├── NynTest.php
│ ├── OcFrTest.php
│ ├── OcTest.php
│ ├── OmEtTest.php
│ ├── OmKeTest.php
│ ├── OmTest.php
│ ├── OrInTest.php
│ ├── OrTest.php
│ ├── OsRuTest.php
│ ├── OsTest.php
│ ├── PaArabTest.php
│ ├── PaGuruTest.php
│ ├── PaInTest.php
│ ├── PaPkTest.php
│ ├── PaTest.php
│ ├── PapAwTest.php
│ ├── PapCwTest.php
│ ├── PapTest.php
│ ├── PlPlTest.php
│ ├── PlTest.php
│ ├── PrgTest.php
│ ├── PsAfTest.php
│ ├── PsTest.php
│ ├── PtAoTest.php
│ ├── PtBrTest.php
│ ├── PtChTest.php
│ ├── PtCvTest.php
│ ├── PtGqTest.php
│ ├── PtGwTest.php
│ ├── PtLuTest.php
│ ├── PtMoTest.php
│ ├── PtMzTest.php
│ ├── PtPtTest.php
│ ├── PtStTest.php
│ ├── PtTest.php
│ ├── PtTlTest.php
│ ├── QuBoTest.php
│ ├── QuEcTest.php
│ ├── QuTest.php
│ ├── QuzPeTest.php
│ ├── QuzTest.php
│ ├── RajInTest.php
│ ├── RajTest.php
│ ├── RmTest.php
│ ├── RnTest.php
│ ├── RoMdTest.php
│ ├── RoRoTest.php
│ ├── RoTest.php
│ ├── RofTest.php
│ ├── RuByTest.php
│ ├── RuKgTest.php
│ ├── RuKzTest.php
│ ├── RuMdTest.php
│ ├── RuRuTest.php
│ ├── RuTest.php
│ ├── RuUaTest.php
│ ├── RwRwTest.php
│ ├── RwTest.php
│ ├── RwkTest.php
│ ├── SaInTest.php
│ ├── SaTest.php
│ ├── SahRuTest.php
│ ├── SahTest.php
│ ├── SaqTest.php
│ ├── SatInTest.php
│ ├── SatTest.php
│ ├── SbpTest.php
│ ├── ScItTest.php
│ ├── ScTest.php
│ ├── ScrTest.php
│ ├── SdInDevanagariTest.php
│ ├── SdInTest.php
│ ├── SdTest.php
│ ├── SeFiTest.php
│ ├── SeNoTest.php
│ ├── SeSeTest.php
│ ├── SeTest.php
│ ├── SehTest.php
│ ├── SesTest.php
│ ├── SgTest.php
│ ├── SgsLtTest.php
│ ├── SgsTest.php
│ ├── ShTest.php
│ ├── ShiLatnTest.php
│ ├── ShiTest.php
│ ├── ShiTfngTest.php
│ ├── ShnMmTest.php
│ ├── ShnTest.php
│ ├── ShsCaTest.php
│ ├── ShsTest.php
│ ├── SiLkTest.php
│ ├── SiTest.php
│ ├── SidEtTest.php
│ ├── SidTest.php
│ ├── SkSkTest.php
│ ├── SkTest.php
│ ├── SlSiTest.php
│ ├── SlTest.php
│ ├── SmTest.php
│ ├── SmWsTest.php
│ ├── SmnTest.php
│ ├── SnTest.php
│ ├── SoDjTest.php
│ ├── SoEtTest.php
│ ├── SoKeTest.php
│ ├── SoSoTest.php
│ ├── SoTest.php
│ ├── SqAlTest.php
│ ├── SqMkTest.php
│ ├── SqTest.php
│ ├── SqXkTest.php
│ ├── SrCyrlBaTest.php
│ ├── SrCyrlMeTest.php
│ ├── SrCyrlTest.php
│ ├── SrCyrlXkTest.php
│ ├── SrLatnBaTest.php
│ ├── SrLatnMeTest.php
│ ├── SrLatnTest.php
│ ├── SrLatnXkTest.php
│ ├── SrMeTest.php
│ ├── SrRsLatinTest.php
│ ├── SrRsTest.php
│ ├── SrTest.php
│ ├── SsTest.php
│ ├── SsZaTest.php
│ ├── StTest.php
│ ├── StZaTest.php
│ ├── SvAxTest.php
│ ├── SvFiTest.php
│ ├── SvSeTest.php
│ ├── SvTest.php
│ ├── SwCdTest.php
│ ├── SwKeTest.php
│ ├── SwTest.php
│ ├── SwTzTest.php
│ ├── SwUgTest.php
│ ├── SzlPlTest.php
│ ├── SzlTest.php
│ ├── TaInTest.php
│ ├── TaLkTest.php
│ ├── TaMyTest.php
│ ├── TaSgTest.php
│ ├── TaTest.php
│ ├── TcyInTest.php
│ ├── TcyTest.php
│ ├── TeInTest.php
│ ├── TeTest.php
│ ├── TeoKeTest.php
│ ├── TeoTest.php
│ ├── TetTest.php
│ ├── TgTest.php
│ ├── TgTjTest.php
│ ├── ThTest.php
│ ├── ThThTest.php
│ ├── TheNpTest.php
│ ├── TheTest.php
│ ├── TiErTest.php
│ ├── TiEtTest.php
│ ├── TiTest.php
│ ├── TigErTest.php
│ ├── TigTest.php
│ ├── TkTest.php
│ ├── TkTmTest.php
│ ├── TlPhTest.php
│ ├── TlTest.php
│ ├── TlhTest.php
│ ├── TnTest.php
│ ├── TnZaTest.php
│ ├── ToTest.php
│ ├── ToToTest.php
│ ├── TpiPgTest.php
│ ├── TpiTest.php
│ ├── TrCyTest.php
│ ├── TrTest.php
│ ├── TrTrTest.php
│ ├── TsTest.php
│ ├── TsZaTest.php
│ ├── TtRuIqtelifTest.php
│ ├── TtRuTest.php
│ ├── TtTest.php
│ ├── TwqTest.php
│ ├── TzlTest.php
│ ├── TzmLatnTest.php
│ ├── TzmTest.php
│ ├── UgCnTest.php
│ ├── UgTest.php
│ ├── UkTest.php
│ ├── UkUaTest.php
│ ├── UnmTest.php
│ ├── UnmUsTest.php
│ ├── UrInTest.php
│ ├── UrPkTest.php
│ ├── UrTest.php
│ ├── UzArabTest.php
│ ├── UzCyrlTest.php
│ ├── UzLatnTest.php
│ ├── UzTest.php
│ ├── UzUzCyrillicTest.php
│ ├── UzUzTest.php
│ ├── VaiLatnTest.php
│ ├── VaiTest.php
│ ├── VaiVaiiTest.php
│ ├── VeTest.php
│ ├── VeZaTest.php
│ ├── ViTest.php
│ ├── ViVnTest.php
│ ├── VoTest.php
│ ├── VunTest.php
│ ├── WaBeTest.php
│ ├── WaTest.php
│ ├── WaeChTest.php
│ ├── WaeTest.php
│ ├── WalEtTest.php
│ ├── WalTest.php
│ ├── WoSnTest.php
│ ├── WoTest.php
│ ├── XhTest.php
│ ├── XhZaTest.php
│ ├── XogTest.php
│ ├── YavTest.php
│ ├── YiTest.php
│ ├── YiUsTest.php
│ ├── YoBjTest.php
│ ├── YoNgTest.php
│ ├── YoTest.php
│ ├── YueHansTest.php
│ ├── YueHantTest.php
│ ├── YueHkTest.php
│ ├── YueTest.php
│ ├── YuwPgTest.php
│ ├── YuwTest.php
│ ├── ZghTest.php
│ ├── ZhCnTest.php
│ ├── ZhHansHkTest.php
│ ├── ZhHansMoTest.php
│ ├── ZhHansSgTest.php
│ ├── ZhHansTest.php
│ ├── ZhHantHkTest.php
│ ├── ZhHantMoTest.php
│ ├── ZhHantTest.php
│ ├── ZhHantTwTest.php
│ ├── ZhHkTest.php
│ ├── ZhMoTest.php
│ ├── ZhSgTest.php
│ ├── ZhTest.php
│ ├── ZhTwTest.php
│ ├── ZhYueTest.php
│ ├── ZuTest.php
│ └── ZuZaTest.php
├── PHPStan/
│ ├── FeaturesTest.php
│ ├── Fixture.php
│ ├── MacroExtensionTest.php
│ ├── MixinClass.php
│ ├── bad-project.neon
│ ├── bootstrap-non-static.php
│ ├── bootstrap.php
│ └── project.neon
├── PHPUnit/
│ ├── AssertObjectHasPropertyNoopTrait.php
│ ├── AssertObjectHasPropertyPolyfillTrait.php
│ └── AssertObjectHasPropertyTrait.php
├── Unit/
│ ├── MonthTest.php
│ ├── UnitTest.php
│ └── WeekDayTest.php
├── bootstrap.php
├── phpmd-test.xml
└── remove-comments-in-switch.php
================================================
FILE CONTENTS
================================================
================================================
FILE: .editorconfig
================================================
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
[*.yml]
indent_style = space
indent_size = 2
================================================
FILE: .gitattributes
================================================
/.editorconfig export-ignore
/.gitattributes export-ignore
/.github export-ignore
/.gitignore export-ignore
/.multi-tester.yml export-ignore
/.php-cs-fixer.dist.php export-ignore
/.styleci.yml export-ignore
/.travis.yml export-ignore
/build.php export-ignore
/contributing.md export-ignore
/codecov.yml export-ignore
/phpdoc.php export-ignore
/phpmd.xml export-ignore
/phpstan.neon export-ignore
/phpunit.xml.dist export-ignore
/psalm.xml export-ignore
/sponsors.php export-ignore
/tests export-ignore
* text=auto eol=lf
================================================
FILE: .github/FUNDING.yml
================================================
github: kylekatarnls
open_collective: Carbon
tidelift: packagist/nesbot/carbon
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: kylekatarnls
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
A stand-alone chunk of code (with no dependences to other packages, user-land function nor variables with unknow values), for example:
```php
echo Carbon::parse('2018-06-01')->subDay()->month;
```
**Expected behavior**
A clear and concise description of what you expected to happen.
**Actual behavior**
Show the value(s) you get. If you get an error or exception, provide the whole stack trace of it.
**Versions**
- PHP: [e.g. 8.4.11] (use `echo phpversion();` to get it)
- Carbon: [e.g. 3.10.2] (run `composer show nesbot/carbon` to find it)
**Additional context**
Add any other context about the problem here. If some default timezone or other php.ini settings are in use for instance.
================================================
FILE: .github/ISSUE_TEMPLATE.md
================================================
<!--
🛑 Important notice to read.
Before anything else, please search in previous issues (both open and close):
https://github.com/briannesbitt/Carbon/issues?q=is%3Aissue
https://github.com/CarbonPHP/carbon/issues?q=is%3Aissue
⚠️ Please don't create an issue about a problem already discussed or addressed.
⚠️ Please check if the documentation (https://carbonphp.github.io/carbon/) answer
your question or talk about the behavior you're about to describe.
Note that Carbon extends the PHP DateTime class
(https://www.php.net/manual/en/class.datetime.php) be sure you report
a Carbon-specific problem, if the same happens using DateTime,
refer to https://github.com/php/php-src
⚠️ Don't remove this template.
This issue template applies to all
- bug reports,
- feature proposals,
- and documentation requests
Having all those information will allow us to know exactly
what you expect and answer you faster and precisely (answer
that matches your Carbon version, PHP version and usage).
Note: Comments between <!- - and - -> won't appear in the final
issue (See [Preview] tab).
-->
Hello,
I encountered an issue with the following code:
<!--
⚠️ Your code below (not the code from inside Carbon library)
Be sure it's dependency-free and enough to reproduce the issue
when we run it on:
https://play.phpsandbox.io/embed/nesbot/carbon
-->
```php
echo Carbon::parse('2018-06-01')->subDay()->month;
```
Carbon version: **PUT HERE YOUR CARBON VERSION (exact version, not the range)**
<!--
⚠️ Run the command `composer show nesbot/carbon` to get "versions"
-->
PHP version: **PUT HERE YOUR PHP VERSION**
<!--
Use `echo phpversion();`
to get PHP version.
Some issues can depends on your context, settings,
macros, timezone, language. So to be sure the code
you give is enough to reproduce your bug, try it
first in:
https://play.phpsandbox.io/embed/nesbot/carbon?input=%3C%3Fphp%0A%0Aecho%20Carbon%3A%3Aparse('2018-06-01')-%3EsubDay()-%3Emonth%3B
You can use the [Options] button to change the version
then when you get the bug with this editor, you can use
the [Export] button, copy the link of the opened tab,
then paste it in the issue. Then we can immediately get
your issue.
-->
I expected to get:
```
6
```
<!--
Always give your expectations. Each use has their owns.
You may want daylight saving time to be taken into account,
someone else want it to be ignored. You may want timezone
to be used in comparisons, someone else may not, etc.
-->
But I actually get:
```
5
```
<!--
If you did not succeed to get the same result in
https://play.phpsandbox.io/embed/nesbot/carbon?input=%3C%3Fphp%0A%0Aecho%20Carbon%3A%3Aparse('2018-06-01')%3B then precise the
result you get.
-->
Thanks!
================================================
FILE: .github/dependabot.yml
================================================
version: 2
updates:
- package-ecosystem: composer
directory: /
schedule:
interval: weekly
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
================================================
FILE: .github/workflows/deploy-documentation.yml
================================================
name: Deploy Documentation
on:
schedule:
- cron: '0 0 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: gh-pages
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.4
extensions: json
tools: composer:v2
coverage: none
- name: Install dependencies
run: composer update --prefer-dist --no-interaction --no-suggest
- name: Run PHP generators
run: composer run build
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: 24
cache: pnpm
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Install dependencies
run: pnpm install
- name: Build with VitePress
run: pnpm docs:build
env:
REPOSITORY: ${{ github.repository }}
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
path: docs/.vitepress/dist
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
================================================
FILE: .github/workflows/documentation.yml
================================================
name: Documentation
on:
schedule:
- cron: '0 0 15 * *'
- cron: '0 0 2 * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
sponsors:
name: Update documentation
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v6
with:
ref: gh-pages
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.4
tools: composer:v2
- name: Get composer cache directory
id: composer-cache
shell: bash
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies
uses: actions/cache@v5
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: "documentation-${{ hashFiles('**/composer.json') }}"
restore-keys: "documentation-${{ hashFiles('**/composer.json') }}"
- name: Install dependencies
uses: nick-fields/retry@v3
if: steps.composer-cache.outputs.cache-hit != 'true'
with:
timeout_minutes: 10
max_attempts: 3
command: composer update --prefer-dist --no-progress --prefer-stable
- name: Update documentation
run: composer build
- name: Create Pull Request
if: github.repository_owner == 'briannesbitt'
uses: peter-evans/create-pull-request@v8
with:
branch: job/update-documentation
commit-message: Update documentation
title: Update documentation
body: Monthly automated documentation update
assignees: kylekatarnls
reviewers: kylekatarnls
add-paths: :!history.json
================================================
FILE: .github/workflows/laravel.yml
================================================
name: Laravel
on: [ pull_request, push ]
jobs:
ubuntu:
runs-on: ubuntu-latest
services:
memcached:
image: memcached:1.6-alpine
ports:
- 11211:11211
mysql:
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: forge
ports:
- 33306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
redis:
image: redis:7.0
ports:
- 6379:6379
options: --entrypoint redis-server
dynamodb:
image: amazon/dynamodb-local:2.0.0
ports:
- 8888:8000
strategy:
fail-fast: false
matrix:
php: [8.3, 8.5]
reference: [12.x]
name: ${{ matrix.reference }} - PHP ${{ matrix.php }}
steps:
- name: Checkout the code
uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd, redis, igbinary, msgpack, memcached, gmp, :php-psr
ini-values: error_reporting=E_ALL
tools: composer:v2
coverage: none
env:
REDIS_CONFIGURE_OPTS: --enable-redis --enable-redis-igbinary --enable-redis-msgpack --enable-redis-lzf --with-liblzf --enable-redis-zstd --with-libzstd --enable-redis-lz4 --with-liblz4
REDIS_LIBS: liblz4-dev, liblzf-dev, libzstd-dev
- name: Install locales
run: |
sudo apt-get update || apt --fix-broken install || echo 'Apt failure ignored'
sudo apt-get install tzdata locales -y && sudo locale-gen fr_FR.UTF-8 sr_ME.UTF-8 ar_AE.UTF-8 zh_TW.UTF-8 zh_CN.UTF-8 yo_NG.UTF-8 en_US.UTF-8 || echo 'Apt failure ignored'
- name: Get composer cache directory
id: composer-cache-ubuntu
run: echo "dir=$(composer config cache-files-dir)" > $GITHUB_OUTPUT
- name: Cache composer dependencies
uses: actions/cache@v5
with:
path: ${{ steps.composer-cache-ubuntu.outputs.dir }}
key: "l${{ matrix.reference }}-php-${{ matrix.php }}-ubuntu-${{ hashFiles('**/composer.json') }}"
restore-keys: "l${{ matrix.reference }}-php-${{ matrix.php }}-ubuntu-${{ hashFiles('**/composer.json') }}"
- name: Install dependencies
uses: nick-fields/retry@v3
if: steps.composer-cache.outputs.cache-hit != 'true'
with:
timeout_minutes: 10
max_attempts: 3
command: |
composer remove --no-update phpmd/phpmd friendsofphp/php-cs-fixer --no-interaction --dev;
composer update --prefer-dist --no-progress --prefer-stable;
- name: Execute tests
run: vendor/bin/multi-tester tests/Laravel/laravel.${{ matrix.reference }}.multi-tester.yml
env:
DB_PORT: ${{ job.services.mysql.ports[3306] }}
DB_USERNAME: root
DYNAMODB_CACHE_TABLE: laravel_dynamodb_test
DYNAMODB_ENDPOINT: "http://localhost:8888"
AWS_ACCESS_KEY_ID: randomKey
AWS_SECRET_ACCESS_KEY: randomSecret
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
================================================
FILE: .github/workflows/phpcs.yml
================================================
name: PHP-CS-Fixer
on: [ pull_request, push ]
jobs:
lint:
name: PHP-CS-Fixer
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v6
- name: Ignore comments in switch
run: php tests/remove-comments-in-switch.php
- name: Check for code style violation with PHP-CS-Fixer
uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --diff --dry-run
================================================
FILE: .github/workflows/phpmd.yml
================================================
name: PHPMD
on: [ pull_request, push ]
jobs:
ubuntu:
name: PHPMD
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- php: 8.3
steps:
- name: Checkout the code
uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: json, msgpack
tools: composer:v2
coverage: none
- name: Install dependencies
uses: nick-fields/retry@v3
with:
timeout_minutes: 10
max_attempts: 3
command: |
composer remove --no-update phpstan/extension-installer phpstan/phpstan ondrejmirtes/better-reflection friendsofphp/php-cs-fixer kylekatarnls/multi-tester --no-interaction --dev;
composer update --prefer-dist --no-progress --prefer-${{ matrix.setup || 'stable' }};
- name: Check source code
run: composer phpmd
- name: Check tests code
run: composer phpmd-test
================================================
FILE: .github/workflows/phpstan.yml
================================================
name: PHPStan
on: [ pull_request, push ]
jobs:
ubuntu:
name: PHPStan
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- php: 8.3
steps:
- name: Checkout the code
uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: json, msgpack
tools: composer:v2
coverage: none
- name: Get composer cache directory
id: composer-cache
shell: bash
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies
uses: actions/cache@v5
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: "phpstan-${{ matrix.php }}-${{ matrix.setup }}-${{ matrix.os }}-${{ matrix.phpunit }}-${{ hashFiles('**/composer.json') }}"
restore-keys: "phpstan-${{ matrix.php }}-${{ matrix.setup }}-${{ matrix.os }}-${{ matrix.phpunit }}-${{ hashFiles('**/composer.json') }}"
- name: Install dependencies
uses: nick-fields/retry@v3
with:
timeout_minutes: 10
max_attempts: 3
command: |
composer remove --no-update phpmd/phpmd friendsofphp/php-cs-fixer kylekatarnls/multi-tester --no-interaction --dev;
composer require --no-update doctrine/orm symfony/config --no-interaction;
composer update --prefer-dist --no-progress --prefer-${{ matrix.setup || 'stable' }};
- name: Run phpstan
run: composer phpstan
================================================
FILE: .github/workflows/sponsors.yml
================================================
name: Sponsors
on:
schedule:
- cron: '0 0 15 * *'
- cron: '0 0 2 * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
sponsors:
name: Update readme
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v6
with:
ref: master
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.4
tools: composer:v2
- name: Get composer cache directory
id: composer-cache
shell: bash
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies
uses: actions/cache@v5
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: "sponsors-${{ hashFiles('**/composer.json') }}"
restore-keys: "sponsors-${{ hashFiles('**/composer.json') }}"
- name: Install dependencies
uses: nick-fields/retry@v3
if: steps.composer-cache.outputs.cache-hit != 'true'
with:
timeout_minutes: 10
max_attempts: 3
command: composer update --prefer-dist --no-progress --prefer-stable
- name: Update sponsors on readme.md
run: composer sponsors
- name: Create Pull Request
if: github.repository_owner == 'briannesbitt'
uses: peter-evans/create-pull-request@v8
with:
branch: job/update-sponsors
commit-message: Update sponsors
title: Update sponsors
body: Monthly automated sponsors update
assignees: kylekatarnls
reviewers: kylekatarnls
add-paths: |
readme.md
================================================
FILE: .github/workflows/tests.yml
================================================
name: Tests
on: [ pull_request, push ]
jobs:
tests:
strategy:
fail-fast: false
matrix:
os: [ubuntu]
php: [8.1, 8.2, 8.3, 8.4, 8.5]
setup: [lowest, stable]
include:
- php: 8.1
os: windows
setup: lowest
- php: 8.1
os: windows
setup: stable
- php: 8.5
os: windows
setup: stable
- php: 8.1
os: ubuntu
setup: stable
classmap-authoritative: true
- php: 8.3
os: ubuntu
setup: stable
phpunit: 11
coverage: true
- php: 8.4
os: ubuntu
setup: stable
phpunit: 11
- php: 8.4
os: ubuntu
setup: stable
phpunit: 12
name: ${{ matrix.phpunit && format('PHPUnit {0} - ', matrix.phpunit) || '' }}${{ matrix.classmap-authoritative && 'classmap-authoritative - ' || '' }}${{ matrix.coverage && 'Coverage - ' || '' }}PHP ${{ matrix.php }} - ${{ matrix.setup || 'stable' }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}-latest
steps:
- name: Checkout the code
uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: json, msgpack
ini-values: error_reporting=${{ (matrix.setup != 'lowest') && '32767' || '8191' }}
tools: composer:v2
coverage: ${{ matrix.coverage && 'pcov' || 'none' }}
- name: Install locales
if: matrix.os == 'ubuntu'
run: |
sudo apt-get update || apt --fix-broken install || echo 'Apt failure ignored'
sudo apt-get install tzdata locales -y && sudo locale-gen fr_FR.UTF-8 sr_ME.UTF-8 ar_AE.UTF-8 zh_TW.UTF-8 zh_CN.UTF-8 yo_NG.UTF-8 en_US.UTF-8 || echo 'Apt failure ignored'
- name: Get composer cache directory
id: composer-cache
shell: bash
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies
uses: actions/cache@v5
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: "php-${{ matrix.php }}-${{ matrix.setup }}-${{ matrix.os }}-${{ matrix.phpunit }}-${{ hashFiles('**/composer.json') }}"
restore-keys: "php-${{ matrix.php }}-${{ matrix.setup }}-${{ matrix.os }}-${{ matrix.phpunit }}-${{ hashFiles('**/composer.json') }}"
- name: Select PHPUnit version
if: matrix.phpunit
shell: bash
run: composer require --no-update --no-interaction --dev "phpunit/phpunit:^${{ matrix.phpunit }}"
- name: Remove conflicting optional dependencies
if: matrix.phpunit >= 11
run: composer remove --no-update --no-interaction --dev ondrejmirtes/better-reflection
- name: Downgrade nikic/php-parser
if: matrix.phpunit < 11 && matrix.php < 8.5
shell: bash
run: composer require --no-update --no-interaction --dev "nikic/php-parser:^4"
- name: Updgrade symfony/translation
if: matrix.php >= 8.4
shell: bash
run: composer require --no-update --no-interaction "symfony/translation:^5.4.35||^6.3.12||^7.0.3||^8.0.0" "symfony/contracts:^2.5.3||>=3.4.2" "sebastian/exporter:>5.1.2"
# https://github.com/symfony/symfony/commit/f4118e110a46de3ffb799e7d79bf15128d1646ea
- name: Install dependencies
uses: nick-fields/retry@v3
if: steps.composer-cache.outputs.cache-hit != 'true'
with:
timeout_minutes: 10
max_attempts: 3
command: |
composer remove --no-update --no-interaction --dev phpmd/phpmd friendsofphp/php-cs-fixer kylekatarnls/multi-tester;
composer update --prefer-dist --no-progress --prefer-${{ matrix.setup || 'stable' }} ${{ matrix.classmap-authoritative && '--classmap-authoritative' || '' }}${{ matrix.php >= 8.2 && ' --ignore-platform-reqs' || '' }};
- name: Run test suite
if: matrix.coverage != true
run: php -d memory_limit=-1 -d zend.enable_gc=0 -d error_reporting=-1 vendor/phpunit/phpunit/phpunit --exclude-testsuite=localization --default-time-limit=${{ matrix.php >= 8.2 && '2' || '4' }} ${{ matrix.os == 'ubuntu' && '--enforce-time-limit' || '' }} --display-incomplete --display-skipped --display-deprecations --display-errors --display-notices --display-warnings
env:
PHP_VERSION: ${{ matrix.php }}
- name: Run test suite with coverage
if: matrix.coverage
run: php -d memory_limit=-1 -d zend.enable_gc=0 -d error_reporting=-1 vendor/phpunit/phpunit/phpunit --default-time-limit=3 ${{ matrix.os == 'ubuntu' && '--enforce-time-limit' || '' }} --coverage-clover=clover.xml --coverage-text
env:
PHP_VERSION: ${{ matrix.php }}
- name: Code Climate Test Reporter
uses: qltysh/qlty-action/coverage@v2
if: matrix.coverage
with:
token: ${{ secrets.QLTY_COVERAGE_TOKEN }}
files: clover.xml
- name: Coverage
if: matrix.coverage
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
================================================
FILE: .gitignore
================================================
.idea
.vscode
*.iml
.php-cs-fixer.php
.php-cs-fixer.cache
vendor
composer.phar
composer.lock
coverage.xml
coverage
phpunit.xml
Carbon-*.zip
*.phpunit.result.cache
/nbproject/
*.cache
================================================
FILE: .php-cs-fixer.dist.php
================================================
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$header = <<<'EOF'
This file is part of the Carbon package.
(c) Brian Nesbitt <brian@nesbot.com>
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
EOF;
$rules = [
'@PSR2' => true,
'@PSR12' => true,
'@PHP71Migration' => true,
'array_syntax' => [
'syntax' => 'short',
],
'blank_line_after_namespace' => true,
'blank_line_before_statement' => true,
'cast_spaces' => true,
'class_definition' => false,
'concat_space' => [
'spacing' => 'none',
],
'ereg_to_preg' => true,
'general_phpdoc_tag_rename' => true,
'header_comment' => [
'comment_type' => 'PHPDoc',
'header' => $header,
'location' => 'after_declare_strict',
'separate' => 'both',
],
'is_null' => true,
'line_ending' => true,
'modernize_types_casting' => true,
'native_function_invocation' => [
'include' => ['@compiler_optimized', 'app'],
],
'no_blank_lines_after_phpdoc' => true,
'no_empty_phpdoc' => true,
'no_extra_blank_lines' => true,
'no_short_bool_cast' => true,
'no_unneeded_control_parentheses' => true,
'no_unused_imports' => true,
'no_whitespace_in_blank_line' => true,
'ordered_imports' => true,
'php_unit_method_casing' => [
'case' => 'camel_case',
],
'php_unit_test_annotation' => [
'style' => 'prefix',
],
'php_unit_test_case_static_method_calls' => [
'call_type' => 'this',
],
'phpdoc_align' => [
'align' => 'vertical',
'tags' => [
'param',
'return',
'throws',
'type',
'var',
],
],
'phpdoc_indent' => true,
'phpdoc_inline_tag_normalizer' => true,
'phpdoc_no_access' => true,
'phpdoc_no_package' => true,
'phpdoc_order' => true,
'phpdoc_scalar' => true,
'phpdoc_separation' => true,
'phpdoc_tag_type' => [
'tags' => [
'inheritdoc' => 'inline',
],
],
'phpdoc_to_comment' => true,
'phpdoc_trim' => true,
'phpdoc_types' => true,
'phpdoc_var_without_name' => true,
'self_accessor' => true,
'single_quote' => true,
'space_after_semicolon' => true,
'standardize_not_equals' => true,
'ternary_operator_spaces' => true,
'trailing_comma_in_multiline' => true,
'trim_array_spaces' => true,
'unary_operator_spaces' => true,
'yoda_style' => [
'always_move_variable' => false,
'equal' => false,
'identical' => false,
'less_and_greater' => false,
],
];
return (new Config())->setRules($rules)
->setFinder(
Finder::create()
->in(__DIR__)
->notPath([
'src/Carbon/Doctrine/DateTimeImmutableType.php',
'src/Carbon/Doctrine/DateTimeType.php',
]),
)
->setUsingCache(true)
->setRiskyAllowed(true);
================================================
FILE: .phpstorm.meta.php
================================================
<?php
namespace PHPSTORM_META {
registerArgumentsSet("date_units", "millenania", "millennium", "century", "centuries", "decade", "decades", "year", "years", "y", "yr", "yrs", "quarter", "quarters", "month", "months", "mo", "mos", "week", "weeks", "w", "day", "days", "d", "hour", "hours", "h", "minute", "minutes", "m", "second", "seconds", "s", "millisecond", "milliseconds", "milli", "ms", "microsecond", "microseconds", "micro", "µs");
expectedArguments(\Carbon\Traits\Units::add(), 0, argumentsSet("date_units"));
expectedArguments(\Carbon\Traits\Units::add(), 1, argumentsSet("date_units"));
expectedArguments(\Carbon\CarbonInterface::add(), 0, argumentsSet("date_units"));
expectedArguments(\Carbon\CarbonInterface::add(), 1, argumentsSet("date_units"));
expectedArguments(\Carbon\CarbonInterface::getTimeFormatByPrecision(), 0, "minute", "second", "m", "millisecond", "µ", "microsecond", "minutes", "seconds", "ms", "milliseconds", "µs", "microseconds");
}
================================================
FILE: .styleci.yml
================================================
preset: psr2
# Disabled, moved in .github/workflows/phpcs.yml
finder:
exclude:
- "src"
================================================
FILE: LICENSE
================================================
Copyright (C) Brian Nesbitt
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
================================================
FILE: bin/carbon
================================================
#!/usr/bin/env php
<?php
use Carbon\Cli\Invoker;
$dir = __DIR__.'/..';
if (!file_exists($dir.'/autoload.php')) {
$dir = __DIR__.'/../vendor';
}
if (!file_exists($dir.'/autoload.php')) {
$dir = __DIR__.'/../../..';
}
if (!file_exists($dir.'/autoload.php')) {
echo 'Autoload not found.';
exit(1);
}
require $dir.'/autoload.php';
exit((new Invoker())(...$argv) ? 0 : 1);
================================================
FILE: bin/carbon.bat
================================================
@ECHO OFF
setlocal DISABLEDELAYEDEXPANSION
SET BIN_TARGET=%~dp0/carbon
php "%BIN_TARGET%" %*
================================================
FILE: build.php
================================================
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
chdir(__DIR__);
$currentBranch = 'master';
if (preg_match('/On branch ([^\n]+)\n/', shell_exec('git status'), $match)) {
$currentBranch = $match[1];
}
shell_exec('git fetch --all --tags --prune');
$remotes = explode("\n", trim(shell_exec('git remote')));
$tagsCommand = \count($remotes)
? 'git ls-remote --tags '.(\in_array('upstream', $remotes, true) ? 'upstream' : (\in_array('origin', $remotes, true) ? 'origin' : $remotes[0]))
: 'git tag';
$tags = array_map(function ($ref) {
$ref = explode('refs/tags/', $ref);
return $ref[1] ?? $ref[0];
}, array_filter(explode("\n", trim(shell_exec($tagsCommand))), function ($ref) {
return substr($ref, -3) !== '^{}';
}));
usort($tags, 'version_compare');
$tag = isset($argv[1]) && !\in_array($argv[1], ['last', 'latest']) ? $argv[1] : end($tags);
if (strtolower($tag) !== 'all') {
if (!\in_array($tag, $tags, true)) {
echo "Tag must be one of remote tags available:\n";
foreach ($tags as $_tag) {
echo " - $_tag\n";
}
echo "\"$tag\" does not match.\n";
exit(1);
}
$tags = [$tag];
}
function getPhpLevel($tag)
{
if (version_compare($tag, '2.0.0-dev', '<')) {
return '5.3.9';
}
if (version_compare($tag, '3.0.0-dev', '<')) {
return '7.1.8';
}
return '8.1.0';
}
foreach ($tags as $tag) {
$archive = "Carbon-$tag.zip";
if (isset($argv[2]) && $argv[2] === 'missing' && file_exists($archive)) {
continue;
}
$branch = "build-$tag";
shell_exec('git stash');
shell_exec("git branch -d $branch");
shell_exec("git checkout tags/$tag -b $branch");
$phpVersion = getPhpLevel($tag);
shell_exec("composer config platform.php $phpVersion");
shell_exec('composer remove friendsofphp/php-cs-fixer --dev');
shell_exec('composer remove kylekatarnls/multi-tester --dev');
shell_exec('composer remove phpmd/phpmd --dev');
shell_exec('composer remove phpstan/phpstan --dev');
shell_exec('composer remove phpunit/phpunit --dev');
shell_exec('composer remove squizlabs/php_codesniffer --dev');
shell_exec('composer update --no-interaction --no-dev --optimize-autoloader');
$zip = new ZipArchive();
$zip->open($archive, ZipArchive::CREATE | ZipArchive::OVERWRITE);
foreach (['src', 'vendor', 'Carbon', 'lazy'] as $directory) {
if (is_dir($directory)) {
$directory = realpath($directory);
$base = \dirname($directory);
$files = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($directory),
RecursiveIteratorIterator::LEAVES_ONLY,
);
foreach ($files as $name => $file) {
if (!$file->isDir()) {
$filePath = $file->getRealPath();
$zip->addFile($filePath, substr($filePath, \strlen($base) + 1));
}
}
}
}
$autoload = 'autoload.php';
file_put_contents($autoload, "<?php\n\n/**\n * @version $tag\n */\n\nrequire __DIR__.'/vendor/autoload.php';\n");
$zip->addFile($autoload, $autoload);
$zip->close();
unlink($autoload);
shell_exec('git checkout .');
shell_exec("git checkout $currentBranch");
shell_exec("git branch -d $branch");
shell_exec('git stash pop');
shell_exec('composer config platform.php 8.1.0');
shell_exec('composer update --no-interaction');
}
exit(0);
================================================
FILE: codecov.yml
================================================
comment: false
================================================
FILE: composer.json
================================================
{
"name": "nesbot/carbon",
"description": "An API extension for DateTime that supports 281 different languages.",
"license": "MIT",
"type": "library",
"keywords": [
"date",
"time",
"DateTime"
],
"authors": [
{
"name": "Brian Nesbitt",
"email": "brian@nesbot.com",
"homepage": "https://markido.com"
},
{
"name": "kylekatarnls",
"homepage": "https://github.com/kylekatarnls"
}
],
"homepage": "https://carbonphp.github.io/carbon/",
"support": {
"issues": "https://github.com/CarbonPHP/carbon/issues",
"source": "https://github.com/CarbonPHP/carbon",
"docs": "https://carbonphp.github.io/carbon/guide/getting-started/introduction.html"
},
"funding": [
{
"url": "https://github.com/sponsors/kylekatarnls",
"type": "github"
},
{
"url": "https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme",
"type": "tidelift"
},
{
"url": "https://opencollective.com/Carbon#sponsor",
"type": "opencollective"
}
],
"require": {
"php": "^8.1",
"ext-json": "*",
"carbonphp/carbon-doctrine-types": "<100.0",
"psr/clock": "^1.0",
"symfony/clock": "^6.3.12 || ^7.0 || ^8.0",
"symfony/polyfill-mbstring": "^1.0",
"symfony/translation": "^4.4.18 || ^5.2.1 || ^6.0 || ^7.0 || ^8.0"
},
"require-dev": {
"doctrine/dbal": "^3.6.3 || ^4.0",
"doctrine/orm": "^2.15.2 || ^3.0",
"friendsofphp/php-cs-fixer": "^v3.87.1",
"kylekatarnls/multi-tester": "^2.5.3",
"phpmd/phpmd": "^2.15.0",
"phpstan/extension-installer": "^1.4.3",
"phpstan/phpstan": "^2.1.22",
"phpunit/phpunit": "^10.5.53",
"squizlabs/php_codesniffer": "^3.13.4 || ^4.0.0"
},
"provide": {
"psr/clock-implementation": "1.0"
},
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {
"psr-4": {
"Carbon\\": "src/Carbon/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
},
"files": [
"tests/Laravel/ServiceProvider.php"
]
},
"bin": [
"bin/carbon"
],
"config": {
"allow-plugins": {
"phpstan/extension-installer": true,
"composer/package-versions-deprecated": true
},
"process-timeout": 0,
"sort-packages": true
},
"extra": {
"branch-alias": {
"dev-master": "3.x-dev",
"dev-2.x": "2.x-dev"
},
"laravel": {
"providers": [
"Carbon\\Laravel\\ServiceProvider"
]
},
"phpstan": {
"includes": [
"extension.neon"
]
}
},
"scripts": {
"phpcs": "php-cs-fixer fix -v --diff --dry-run",
"phpdoc": "php phpdoc.php",
"phpmd": "phpmd src text /phpmd.xml",
"phpmd-test": "phpmd tests text /tests/phpmd-test.xml",
"phpstan": "phpstan analyse --configuration phpstan.neon",
"phpunit": "phpunit --verbose",
"style-check": [
"@phpcs",
"@phpstan",
"@phpmd"
],
"test": [
"@phpunit",
"@style-check"
],
"sponsors": "php sponsors.php"
}
}
================================================
FILE: contributing.md
================================================
# Contributing to Carbon
## Issue Contributions
Please report any security issue using [Tidelift security contact](https://tidelift.com/security).
Tidelift will coordinate the fix and disclosure.
Please don't disclose security bugs publicly until they have been handled by us.
For any other bug or issue, please click this link and follow the template:
[Create new issue](https://github.com/CarbonPHP/carbon/issues/new)
You may think this template does not apply to your case but please think again. A long description will never be as
clear as a code chunk with the output you expect from it (for either bug report or new features).
## Code Contributions
### Where to begin
We use the label **good first issue** to tag issues that could be a good fit for new contributors, see if there are such issues now following this link:
https://github.com/CarbonPHP/carbon/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22
Else, check the roadmap to see what we plan to do in next releases:
https://github.com/briannesbitt/Carbon/issues/1681
### Develop locally, then submit changes
Fork the [GitHub project](https://github.com/CarbonPHP/carbon) and download it locally:
```shell
git clone https://github.com/<username>/carbon.git
cd Carbon
git remote add upstream https://github.com/CarbonPHP/carbon.git
```
Replace `<username>` with your GitHub username.
Then, you can work on the master or create a specific branch for your development:
```shell
git checkout -b my-feature-branch -t origin/master
```
You can now edit the "Carbon" directory contents.
Before committing, please set your name and your e-mail (use the same e-mail address as in your GitHub account):
```shell
git config --global user.name "Your Name"
git config --global user.email "your.email.address@example.com"
```
The ```--global``` argument will apply this setting for all your git repositories, remove it to set only your Carbon
fork with those settings.
Now you can commit your modifications as you usually do with git:
```shell
git add --all
git commit -m "The commit message log"
```
If your patch fixes an open issue, please insert ```#``` immediately followed by the issue number:
```shell
git commit -m "#21 Fix this or that"
```
Use git rebase (not git merge) to sync your work from time to time:
```shell
git fetch origin
git rebase origin/master
```
Please add some tests for bug fixes and features (so it will ensure next developments will not break your code),
then check all is right with phpunit:
Install PHP if you haven't yet, then install composer:
https://getcomposer.org/download/
Update dependencies:
```
./composer.phar update
```
Or if you installed composer globally:
```
composer update
```
Then call phpunit:
```
./vendor/bin/phpunit
```
Make sure all tests succeed before submitting your pull-request, else we will not be able to merge it.
Push your work on your remote GitHub fork with:
```
git push origin my-feature-branch
```
Go to https://github.com/yourusername/Carbon and select your feature branch. Click the 'Pull Request' button and fill
out the form.
We will review it within a few days. And we thank you in advance for your help.
## Versioning
### Note about Semantic Versioning and breaking changes
As a developer, you must understand every change is a breaking change. What is a bug for someone
is expected in someone else's workflow. The consequence of a change strongly depends on the usage.
[Semantic Versioning](https://semver.org/) relies to public API. In PHP, the public API of a class is its public
methods. However, if you extend a class, you can access protected methods, then if you use reflexion, you can
access private methods. So anything can become a public API if you force it to be. That doesn't mean we should handle
any possible usage, else we would have to publish a major release for each change and it would no longer make sense.
So before any complain about a breaking change, be warned, we do not guarantee a strict Semantic Versioning as you
may expect, we're following a pragmatic interpretation of Semantic Versioning that allows the software to evolve in a
reliable way with reasonable maintenance effort.
Concretely, we consider a change as breaking if it makes fail one of our unit test. We will do our best to avoid
incompatibilities with libraries that extends Carbon classes (such as Laravel that is continuously tested thanks to
Travis CI, [see the compatibility matrix](https://github.com/kylekatarnls/carbon-laravel/tree/master#carbon-1-dev-version-1next)).
If you're the owner of a library that strongly depends on Carbon, we recommend you to run unit tests daily requiring
`"nesbot/carbon": "dev-master"` (for `^2`) or `"nesbot/carbon": "dev-version-1.next"` (for `^1`), this way you can
detect incompatibilities earlier and report it to us before we tag a release. We'll pay attention and try to fix it to
make update to next minor releases as soft as possible.
We reserve the right to publish emergency patches within 24 hours after a release if a tag that does not respect
this pattern would have been released despite our vigilance. In this very rare and particular case, we would mark the
tag as broken on GitHub and backward compatibility would be based on previous stable tag.
Last, you must understand that Carbon extends PHP natives classes, that means Carbon can be impacted by any change
that occurs in the date/time API of PHP. We watch new PHP versions and handle those changes as quickly as possible
when detected, but as PHP does not follow the semantic versioning pattern, it basically means any releases (including
patches) can have unexpected consequences on Carbon methods results.
### Long term support
To benefit the better support, require Carbon using major version range (`^1` or `^2`). By requiring `1.26.*`,
`~1.26.0` or limited range such as `>=1.20 <1.33`, you fall to low priority support (only security and critical issues
will be fixed), our prior support goes to next minor releases of each major version. It applies to bug fixes and
low-cost features. Other new features will only be added in the last stable release. At the opposite, we recommend you
to restrain to a major number, as there is no compatibility guarantee from a major version to the next. It means
requiring `>=2`, as it allows any newer version, will probably leads to errors on releasing our next major version.
Open milestones can be patched if a minor bug is detected while if you're on a closed milestone, we'll more likely
ask you to update first to an open one. See currently open milestones:
https://github.com/CarbonPHP/carbon/milestones
================================================
FILE: extension.neon
================================================
services:
-
class: Carbon\PHPStan\MacroExtension
tags:
- phpstan.broker.methodsClassReflectionExtension
================================================
FILE: lazy/Carbon/MessageFormatter/MessageFormatterMapperStrongType.php
================================================
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\MessageFormatter;
use Symfony\Component\Translation\Formatter\MessageFormatterInterface;
if (!class_exists(LazyMessageFormatter::class, false)) {
abstract class LazyMessageFormatter implements MessageFormatterInterface
{
public function format(string $message, string $locale, array $parameters = []): string
{
return $this->formatter->format(
$message,
$this->transformLocale($locale),
$parameters
);
}
}
}
================================================
FILE: lazy/Carbon/MessageFormatter/MessageFormatterMapperWeakType.php
================================================
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\MessageFormatter;
use Symfony\Component\Translation\Formatter\ChoiceMessageFormatterInterface;
use Symfony\Component\Translation\Formatter\MessageFormatterInterface;
if (!class_exists(LazyMessageFormatter::class, false)) {
abstract class LazyMessageFormatter implements MessageFormatterInterface, ChoiceMessageFormatterInterface
{
abstract protected function transformLocale(?string $locale): ?string;
public function format($message, $locale, array $parameters = [])
{
return $this->formatter->format(
$message,
$this->transformLocale($locale),
$parameters
);
}
public function choiceFormat($message, $number, $locale, array $parameters = [])
{
return $this->formatter->choiceFormat($message, $number, $locale, $parameters);
}
}
}
================================================
FILE: lazy/Carbon/ProtectedDatePeriod.php
================================================
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon;
use DatePeriod;
if (!class_exists(DatePeriodBase::class, false)) {
class DatePeriodBase extends DatePeriod
{
/**
* Period start in PHP < 8.2.
*
* @var CarbonInterface
*
* @deprecated PHP 8.2 this property is no longer in sync with the actual period start.
*/
protected $start;
/**
* Period end in PHP < 8.2.
*
* @var CarbonInterface|null
*
* @deprecated PHP 8.2 this property is no longer in sync with the actual period end.
*/
protected $end;
/**
* Period current iterated date in PHP < 8.2.
*
* @var CarbonInterface|null
*
* @deprecated PHP 8.2 this property is no longer in sync with the actual period current iterated date.
*/
protected $current;
/**
* Period interval in PHP < 8.2.
*
* @var CarbonInterval|null
*
* @deprecated PHP 8.2 this property is no longer in sync with the actual period interval.
*/
protected $interval;
/**
* Period recurrences in PHP < 8.2.
*
* @var int|float|null
*
* @deprecated PHP 8.2 this property is no longer in sync with the actual period recurrences.
*/
protected $recurrences;
/**
* Period start included option in PHP < 8.2.
*
* @var bool
*
* @deprecated PHP 8.2 this property is no longer in sync with the actual period start included option.
*/
protected $include_start_date;
}
}
================================================
FILE: lazy/Carbon/TranslatorStrongType.php
================================================
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon;
use Symfony\Component\Translation\MessageCatalogueInterface;
if (!class_exists(LazyTranslator::class, false)) {
class LazyTranslator extends AbstractTranslator implements TranslatorStrongTypeInterface
{
public function trans(?string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string
{
return $this->translate($id, $parameters, $domain, $locale);
}
public function getFromCatalogue(MessageCatalogueInterface $catalogue, string $id, string $domain = 'messages')
{
$messages = $this->getPrivateProperty($catalogue, 'messages');
if (isset($messages[$domain.MessageCatalogueInterface::INTL_DOMAIN_SUFFIX][$id])) {
return $messages[$domain.MessageCatalogueInterface::INTL_DOMAIN_SUFFIX][$id];
}
if (isset($messages[$domain][$id])) {
return $messages[$domain][$id];
}
$fallbackCatalogue = $this->getPrivateProperty($catalogue, 'fallbackCatalogue');
if ($fallbackCatalogue !== null) {
return $this->getFromCatalogue($fallbackCatalogue, $id, $domain);
}
return $id;
}
private function getPrivateProperty($instance, string $field)
{
return (function (string $field) {
return $this->$field;
})->call($instance, $field);
}
}
}
================================================
FILE: lazy/Carbon/TranslatorWeakType.php
================================================
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon;
if (!class_exists(LazyTranslator::class, false)) {
class LazyTranslator extends AbstractTranslator
{
/**
* Returns the translation.
*
* @param string|null $id
* @param array $parameters
* @param string|null $domain
* @param string|null $locale
*
* @return string
*/
public function trans($id, array $parameters = [], $domain = null, $locale = null)
{
return $this->translate($id, $parameters, $domain, $locale);
}
}
}
================================================
FILE: lazy/Carbon/UnprotectedDatePeriod.php
================================================
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon;
use DatePeriod;
if (!class_exists(DatePeriodBase::class, false)) {
class DatePeriodBase extends DatePeriod
{
}
}
================================================
FILE: phpdoc.php
================================================
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Carbon\Carbon;
use Carbon\CarbonImmutable;
use Carbon\CarbonInterface;
use Carbon\Factory;
use Carbon\FactoryImmutable;
$tags = [
'property',
'property-read',
'property-write',
PHP_EOL,
'mode',
['call', 'is'],
['call', 'isDayOfWeek'],
['call', 'isSameUnit'],
['call', 'setUnit'],
['call', 'addUnit'],
['call', 'addUTCUnit'],
['call', 'roundUnit'],
['call', 'diffForHumans'],
];
$nativeMethods = [
'getOffset' => 'int',
'getTimestamp' => 'int',
];
$noInterface = [
'setMicrosecond',
];
$modes = [];
$autoDocLines = [];
$carbon = __DIR__.'/src/Carbon/Carbon.php';
$immutable = __DIR__.'/src/Carbon/CarbonImmutable.php';
$interface = __DIR__.'/src/Carbon/CarbonInterface.php';
$phpLevel = 7.1;
file_put_contents($interface, preg_replace('/(\/\/ <methods[\s\S]*>)([\s\S]+)(<\/methods>)/mU', "$1\n\n // $3", file_get_contents($interface), 1));
require_once __DIR__.'/vendor/autoload.php';
$trait = __DIR__.'/src/Carbon/Traits/Date.php';
$code = '';
$overrideTyping = [
$carbon => [
// 'createFromImmutable' => ['static Carbon', 'DateTimeImmutable $dateTime', 'Create a new Carbon object from an immutable date.'],
// 'createFromFormat' => ['static static', 'string $format, string $time, DateTimeZone|string|false|null $timezone = null', 'Parse a string into a new Carbon object according to the specified format.'],
// '__set_state' => ['static static', 'array $array', 'https://php.net/manual/en/datetime.set-state.php'],
],
$immutable => [
// 'createFromMutable' => ['static CarbonImmutable', 'DateTime $dateTime', 'Create a new CarbonImmutable object from an immutable date.'],
// 'createFromFormat' => ['static static', 'string $format, string $time, DateTimeZone|string|false|null $timezone = null', 'Parse a string into a new CarbonImmutable object according to the specified format.'],
// '__set_state' => ['static static', 'array $array', 'https://php.net/manual/en/datetime.set-state.php'],
],
];
foreach (glob(__DIR__.'/src/Carbon/Traits/*.php') as $file) {
$code .= file_get_contents($file);
}
function unitName($unit)
{
return match ($unit) {
'milli' => 'millisecond',
'micro' => 'microsecond',
default => $unit,
};
}
function pluralize($word)
{
if (preg_match('/(millenni)um$/i', $word)) {
return preg_replace('/(millenni)um$/i', '$1a', $word);
}
return preg_replace('/(centur)y$/i', '$1ie', $word).'s';
}
function dumpValue($value)
{
if ($value === null) {
return 'null';
}
if ($value === CarbonInterface::TRANSLATE_ALL) {
return 'CarbonInterface::TRANSLATE_ALL';
}
$value = preg_replace('/^array\s*\(\s*\)$/', '[]', var_export($value, true));
$value = preg_replace('/^array\s*\(([\s\S]+)\)$/', '[$1]', $value);
return $value;
}
function cleanClassName($name)
{
if ($name === 'CarbonInterval') {
throw new \Exception('stop');
}
if (preg_match('/^[A-Z]/', $name)) {
$name = "\\$name";
}
if ($name === '\\Symfony\\Contracts\\Translation\\TranslatorInterface') {
return 'TranslatorInterface';
}
return preg_replace('/^\\\\(Date(?:Time(?:Immutable|Interface|Zone)?|Interval)|[a-z]*Exception|Closure)$/i', '$1', preg_replace('/^\\\\Carbon\\\\/', '', $name));
}
function dumpType(ReflectionType $type, bool $deep = true, bool $allowsNull = false): string
{
if ($type instanceof ReflectionUnionType) {
return ($deep ? '(' : '').implode('|', array_map(
dumpType(...),
$type->getTypes(),
)).($deep ? ')' : '');
}
if ($type instanceof ReflectionIntersectionType) {
return ($deep ? '(' : '').implode('&', array_map(
dumpType(...),
$type->getTypes(),
)).($deep ? ')' : '');
}
$name = cleanClassName($type instanceof ReflectionNamedType ? $type->getName() : (string) $type);
$nullable = $allowsNull && $name !== 'mixed';
return (!$deep && $nullable ? '?' : '').
$name.
($deep && $nullable ? '|null' : '');
}
function dumpParameter(string $method, ReflectionParameter $parameter): string
{
global $defaultValues;
$name = $parameter->getName();
$output = '$'.$name;
if ($parameter->isVariadic()) {
$output = "...$output";
}
if ($parameter->hasType()) {
$output = dumpType($parameter->getType(), false, $parameter->allowsNull())." $output";
}
if (isset($defaultValues[$method])) {
if (isset($defaultValues[$method][$name])) {
$output .= ' = '.dumpValue($defaultValues[$method][$name]);
}
return $output;
}
if ($parameter->isDefaultValueAvailable()) {
$output .= ' = '.dumpValue($parameter->getDefaultValue());
}
return $output;
}
$deprecated = [];
foreach ($tags as $tag) {
if (\is_array($tag)) {
[$tag, $pattern] = $tag;
}
$pattern ??= '\S+';
if ($tag === PHP_EOL) {
$autoDocLines[] = '';
continue;
}
$unitOfUnit = [];
preg_match_all('/\/\/ @'.$tag.'\s+(?<type>'.$pattern.')(?:\s+\$(?<name>\S+)(?:[^\S\n](?<description>.*))?\n|(?:[^\S\n](?<description2>.*))?\n(?<comments>(?:[ \t]+\/\/[^\n]*\n)*)[^\']*\'(?<name2>[^\']+)\')/', $code, $oneLine, PREG_SET_ORDER);
preg_match_all('/\/\* *@'.$tag.'\s+(?<type>'.$pattern.') *\*\/[^\']*\'(?<name2>[^\']+)\'/', $code, $multiLine, PREG_SET_ORDER);
foreach ([...$oneLine, ...$multiLine] as $match) {
$vars = (object) $match;
$deprecation = null;
if (isset($vars->comments) && preg_match(
'`^[ \t]+(//|/*|#)[ \t]*@deprecated(?:\s(?<deprecation>[\s\S]*))?$`',
$vars->comments,
$comments
)) {
['deprecation' => $deprecation] = $comments;
$deprecation = preg_replace('/^\s*(\/\/|#|\*) {0,3}/m', '', trim($deprecation));
if (preg_match('/^(?:[a-z]+:[^\n]+\n)+$/', "$deprecation\n")) {
$data = [];
foreach (explode("\n", $deprecation) as $line) {
[$name, $value] = array_map('trim', explode(':', $line, 2));
$data[$name] = $value;
}
$deprecation = $data;
} else {
$deprecation = ['reason' => $deprecation];
}
}
$vars->name = ($vars->name ?? null) ?: ($vars->name2 ?? '');
$vars->description = ($vars->description ?? null) ?: ($vars->description2 ?? '');
if ($tag === 'mode') {
$modes[$vars->type] ??= [];
$modes[$vars->type][] = $vars->name;
continue;
}
if ($tag === 'call') {
switch ($vars->type) {
case 'diffForHumans':
foreach ($modes[$vars->type] as $mode) {
$autoDocLines[] = [
'@method',
'string',
"$mode{$vars->name}DiffForHumans(DateTimeInterface \$other = null, int \$parts = 1)",
"Get the difference ($mode format, '{$vars->name}' mode) in a human readable format in the current locale. (\$other and \$parts parameters can be swapped.)",
];
}
break;
case 'isDayOfWeek':
$autoDocLines[] = [
'@method',
'bool',
'is'.ucFirst($vars->name).'()',
'Checks if the instance day is '.unitName(strtolower($vars->name)).'.',
];
break;
case 'is':
$autoDocLines[] = [
'@method',
'bool',
'is'.ucFirst($vars->name).'()',
$vars->description,
];
break;
case 'isSameUnit':
$unit = $vars->name;
$unitName = unitName($unit);
$method = 'isSame'.ucFirst($unit);
if (!method_exists(Carbon::class, $method)) {
$autoDocLines[] = [
'@method',
'bool',
$method.'(DateTimeInterface|string $date)',
"Checks if the given date is in the same $unitName as the instance. If null passed, compare to now (with the same timezone).",
];
}
$autoDocLines[] = [
'@method',
'bool',
'isCurrent'.ucFirst($unit).'()',
"Checks if the instance is in the same $unitName as the current moment.",
];
$autoDocLines[] = [
'@method',
'bool',
'isNext'.ucFirst($unit).'()',
"Checks if the instance is in the same $unitName as the current moment next $unitName.",
];
$autoDocLines[] = [
'@method',
'bool',
'isLast'.ucFirst($unit).'()',
"Checks if the instance is in the same $unitName as the current moment last $unitName.",
];
break;
case 'setUnit':
$unit = $vars->name;
$unitName = unitName($unit);
$plUnit = pluralize($unit);
$enums = $unitName === 'month' ? 'Month|' : '';
$autoDocLines[] = [
'@method',
'self',
"$plUnit({$enums}int \$value)",
"Set current instance $unitName to the given value.",
];
$autoDocLines[] = [
'@method',
'self',
"$unit({$enums}int \$value)",
"Set current instance $unitName to the given value.",
];
$autoDocLines[] = [
'@method',
'self',
'set'.ucfirst($plUnit)."({$enums}int \$value)",
"Set current instance $unitName to the given value.",
];
$autoDocLines[] = [
'@method',
'self',
'set'.ucfirst($unit)."({$enums}int \$value)",
"Set current instance $unitName to the given value.",
];
break;
case 'addUnit':
$unit = $vars->name;
$unitName = unitName($unit);
$plUnit = pluralize($unit);
$plUnitName = pluralize($unitName);
$autoDocLines[] = [
'@method',
'self',
'add'.ucFirst($plUnit).'(int|float $value = 1)',
"Add $plUnitName (the \$value count passed in) to the instance (using date interval).",
];
$autoDocLines[] = [
'@method',
'self',
'add'.ucFirst($unit).'()',
"Add one $unitName to the instance (using date interval).",
];
$autoDocLines[] = [
'@method',
'self',
'sub'.ucFirst($plUnit).'(int|float $value = 1)',
"Sub $plUnitName (the \$value count passed in) to the instance (using date interval).",
];
$autoDocLines[] = [
'@method',
'self',
'sub'.ucFirst($unit).'()',
"Sub one $unitName to the instance (using date interval).",
];
if (\in_array($unit, [
'month',
'quarter',
'year',
'decade',
'century',
'millennium',
])) {
$autoDocLines[] = [
'@method',
'self',
'add'.ucFirst($plUnit).'WithOverflow(int|float $value = 1)',
"Add $plUnitName (the \$value count passed in) to the instance (using date interval) with overflow explicitly allowed.",
];
$autoDocLines[] = [
'@method',
'self',
'add'.ucFirst($unit).'WithOverflow()',
"Add one $unitName to the instance (using date interval) with overflow explicitly allowed.",
];
$autoDocLines[] = [
'@method',
'self',
'sub'.ucFirst($plUnit).'WithOverflow(int|float $value = 1)',
"Sub $plUnitName (the \$value count passed in) to the instance (using date interval) with overflow explicitly allowed.",
];
$autoDocLines[] = [
'@method',
'self',
'sub'.ucFirst($unit).'WithOverflow()',
"Sub one $unitName to the instance (using date interval) with overflow explicitly allowed.",
];
foreach (['WithoutOverflow', 'WithNoOverflow', 'NoOverflow'] as $alias) {
$autoDocLines[] = [
'@method',
'self',
'add'.ucFirst($plUnit)."$alias(int|float \$value = 1)",
"Add $plUnitName (the \$value count passed in) to the instance (using date interval) with overflow explicitly forbidden.",
];
$autoDocLines[] = [
'@method',
'self',
'add'.ucFirst($unit)."$alias()",
"Add one $unitName to the instance (using date interval) with overflow explicitly forbidden.",
];
$autoDocLines[] = [
'@method',
'self',
'sub'.ucFirst($plUnit)."$alias(int|float \$value = 1)",
"Sub $plUnitName (the \$value count passed in) to the instance (using date interval) with overflow explicitly forbidden.",
];
$autoDocLines[] = [
'@method',
'self',
'sub'.ucFirst($unit)."$alias()",
"Sub one $unitName to the instance (using date interval) with overflow explicitly forbidden.",
];
}
break;
}
break;
case 'addUTCUnit':
$unit = $vars->name;
$unitName = unitName($unit);
$plUnit = pluralize($unit);
$plUnitName = pluralize($unitName);
$autoDocLines[] = [
'@method',
'self',
'addUTC'.ucFirst($plUnit).'(int|float $value = 1)',
"Add $plUnitName (the \$value count passed in) to the instance (using timestamp).",
];
$autoDocLines[] = [
'@method',
'self',
'addUTC'.ucFirst($unit).'()',
"Add one $unitName to the instance (using timestamp).",
];
$autoDocLines[] = [
'@method',
'self',
'subUTC'.ucFirst($plUnit).'(int|float $value = 1)',
"Sub $plUnitName (the \$value count passed in) to the instance (using timestamp).",
];
$autoDocLines[] = [
'@method',
'self',
'subUTC'.ucFirst($unit).'()',
"Sub one $unitName to the instance (using timestamp).",
];
$autoDocLines[] = [
'@method',
'CarbonPeriod',
$plUnit.'Until($endDate = null, int|float $factor = 1)',
"Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each $unitName or every X $plUnitName if a factor is given.",
];
$autoDocLines[] = [
'@method',
'float',
'diffInUTC'.ucFirst($plUnit).'(DateTimeInterface|string|null $date, bool $absolute = false)',
"Convert current and given date in UTC timezone and return a floating number of $plUnitName.",
];
break;
case 'roundUnit':
$unit = $vars->name;
$unitName = unitName($unit);
$plUnit = pluralize($unit);
$autoDocLines[] = [
'@method',
'self',
'round'.ucFirst($unit).'(float $precision = 1, string $function = "round")',
"Round the current instance $unitName with given precision using the given function.",
];
$autoDocLines[] = [
'@method',
'self',
'round'.ucFirst($plUnit).'(float $precision = 1, string $function = "round")',
"Round the current instance $unitName with given precision using the given function.",
];
$autoDocLines[] = [
'@method',
'self',
'floor'.ucFirst($unit).'(float $precision = 1)',
"Truncate the current instance $unitName with given precision.",
];
$autoDocLines[] = [
'@method',
'self',
'floor'.ucFirst($plUnit).'(float $precision = 1)',
"Truncate the current instance $unitName with given precision.",
];
$autoDocLines[] = [
'@method',
'self',
'ceil'.ucFirst($unit).'(float $precision = 1)',
"Ceil the current instance $unitName with given precision.",
];
$autoDocLines[] = [
'@method',
'self',
'ceil'.ucFirst($plUnit).'(float $precision = 1)',
"Ceil the current instance $unitName with given precision.",
];
break;
}
continue;
}
$description = trim($vars->description);
$variable = $vars->name;
if (str_starts_with($description, '$')) {
[$variable, $description] = explode(' ', $description, 2);
$variable = ltrim($variable, '$');
$description = ltrim($description);
}
if ($deprecation !== null) {
$deprecated[$tag] = $deprecated[$tag] ?? [];
$deprecated[$tag][] = [
'deprecation' => $deprecation,
'type' => $vars->type,
'variable' => $variable,
'description' => $description ?: '',
];
continue;
}
if (
\in_array($tag, ['property', 'property-read'], true) &&
preg_match('/^[a-z]{2,}(?<operator>In|Of)[A-Z][a-z]+$/', $vars->name, $match)
) {
$unitOfUnit[$vars->name] = [
'@'.($match['operator'] === 'Of' ? 'property' : 'property-read'),
$vars->type,
'$'.$variable,
$description ?: '',
];
continue;
}
$autoDocLines[] = [
'@'.$tag,
$vars->type,
'$'.$variable,
$description ?: '',
];
}
if ($tag === 'property') {
$units = ['microseconds', 'milliseconds', 'seconds', 'minutes', 'hours', 'days', 'weeks', 'months', 'quarters', 'years', 'decades', 'centuries', 'millennia'];
foreach ($units as $small) {
array_shift($units);
foreach ($units as $big) {
$singularSmall = Carbon::singularUnit($small);
$singularBig = Carbon::singularUnit($big);
$name = $singularSmall.'Of'.ucfirst($singularBig);
$unitOfUnit[$name] ??= [
'@property',
'int',
'$'.$name,
'The value of the '.$singularSmall.' starting from the beginning of the current '.$singularBig,
];
}
}
ksort($unitOfUnit);
array_push($autoDocLines, ...array_values($unitOfUnit));
}
if ($tag === 'property-read') {
$units = ['microseconds', 'milliseconds', 'seconds', 'minutes', 'hours', 'days', 'weeks', 'months', 'quarters', 'years', 'decades', 'centuries', 'millennia'];
foreach ($units as $small) {
array_shift($units);
foreach ($units as $big) {
$singularSmall = Carbon::singularUnit($small);
$singularBig = Carbon::singularUnit($big);
$name = $small.'In'.ucfirst($singularBig);
$unitOfUnit[$name] ??= [
'@property-read',
'int',
'$'.$name,
'The number of '.$small.' contained in the current '.$singularBig,
];
}
}
ksort($unitOfUnit);
array_push($autoDocLines, ...array_values($unitOfUnit));
}
}
$units = ['microseconds', 'milliseconds', 'seconds', 'minutes', 'hours', 'days', 'weeks', 'months', 'quarters', 'years', 'decades', 'centuries', 'millennia'];
$unitOfUnit = [
'dayOfYear' => false,
'weeksInYear' => false,
];
foreach ($units as $small) {
array_shift($units);
foreach ($units as $big) {
$singularSmall = Carbon::singularUnit($small);
$singularBig = Carbon::singularUnit($big);
$name = $singularSmall.'Of'.ucfirst($singularBig);
$unitOfUnit[$name] ??= [
'@method',
'int|static',
$name.'(?int $'.$singularSmall.' = null)',
'Return the value of the '.$singularSmall.' starting from the beginning of the current '.$singularBig.' when called with no parameters, change the current '.$singularSmall.' when called with an integer value',
];
$name = $small.'In'.ucfirst($singularBig);
$unitOfUnit[$name] ??= [
'@method',
'int',
$name.'()',
'Return the number of '.$small.' contained in the current '.$singularBig,
];
}
}
ksort($unitOfUnit);
array_push($autoDocLines, ...array_values(array_filter($unitOfUnit)));
$propertyTemplate = '
/**
* %description%
*
* @var %type%
*
* @deprecated %line1%
* %line2%
*/
public $%variable%;
';
$lineGlue = preg_replace('/^[\s\S]*%line1%([\s\S]*)%line2%[\s\S]*$/', '$1', $propertyTemplate);
$propertyTemplate = preg_replace('/(%line1%[\s\S]*%line2%)/', '%deprecation%', $propertyTemplate);
function compileDoc($autoDocLines, $file)
{
global $noInterface;
$class = 'CarbonInterface';
if (preg_match('`[\\\\/](Carbon\w*)\.php$`', $file, $match)) {
$class = $match[1];
}
$autoDoc = '';
$columnsMaxLengths = [];
foreach ($autoDocLines as &$editableLine) {
if (\is_array($editableLine)) {
[$method] = explode('(', $editableLine[2] ?? '');
if (\in_array($method, $noInterface)) {
continue;
}
if (($editableLine[1] ?? '') === 'self') {
$editableLine[1] = $class === 'Carbon' ? '$this' : $class;
}
foreach ($editableLine as $column => $text) {
$length = \strlen($text);
$max = $columnsMaxLengths[$column] ?? 0;
if ($length > $max) {
$columnsMaxLengths[$column] = $length;
}
}
}
}
foreach ($autoDocLines as $line) {
$autoDoc .= "\n *";
if (\is_string($line)) {
if (!empty($line)) {
$autoDoc .= " $line";
}
continue;
}
$computedLine = ' ';
foreach ($line as $column => $text) {
$computedLine .= str_pad($text, $columnsMaxLengths[$column] + 1, ' ', STR_PAD_RIGHT);
}
$autoDoc .= rtrim($computedLine);
}
return $autoDoc;
}
$files = new stdClass();
foreach ([$trait, $carbon, $immutable, $interface] as $file) {
$content = file_get_contents($file);
$files->$file = preg_replace_callback('/(<autodoc[\s\S]*>)([\s\S]+)(<\/autodoc>)/mU', function ($matches) use ($file, $autoDocLines, $overrideTyping) {
foreach (($overrideTyping[$file] ?? []) as $method => $line) {
$line[1] = $method.'('.$line[1].')';
array_unshift($line, '@method');
$autoDocLines[] = $line;
}
$autoDoc = compileDoc($autoDocLines, $file);
return $matches[1]."\n *$autoDoc\n *\n * ".$matches[3];
}, $content, 1);
}
$staticMethods = [];
$staticImmutableMethods = [];
$methods = '';
$carbonMethods = get_class_methods(Carbon::class);
sort($carbonMethods);
function getMethodReturnType(ReflectionMethod $method): string
{
$type = $method->getReturnType();
$type = $type ? dumpType($type, false, $type->allowsNull()) : null;
return $type ? ': '.$type : '';
}
foreach ($carbonMethods as $method) {
if (!method_exists(CarbonImmutable::class, $method) ||
method_exists(DateTimeInterface::class, $method) ||
\in_array($method, ['diff', 'createFromInterface'], true)
) {
continue;
}
$function = new ReflectionMethod(Carbon::class, $method);
$static = $function->isStatic() ? ' static' : '';
$parameters = implode(', ', array_map(function (ReflectionParameter $parameter) use ($method) {
return dumpParameter($method, $parameter);
}, $function->getParameters()));
$methodDocBlock = $function->getDocComment() ?: '';
if (!str_starts_with($method, '__') && $function->isStatic()) {
$doc = preg_replace('/^\/\*+\n([\s\S]+)\s*\*\//', '$1', $methodDocBlock);
$doc = preg_replace('/^\s*\*\s?/m', '', $doc);
$doc = explode("\n@", $doc, 2);
$doc = preg_split('/(\r\n|\r|\n)/', trim($doc[0]));
$returnType = $function->getReturnType();
if ($returnType instanceof ReflectionType) {
$returnType = dumpType($returnType, false, $returnType->allowsNull());
}
if (!$returnType && preg_match('/\*\s*@returns?\s+(\S+)/', $methodDocBlock, $match)) {
$returnType = $match[1];
}
$returnType = str_replace('static|CarbonInterface', 'static', $returnType ?: 'static');
if (!method_exists(Factory::class, $method)) {
$staticMethods[] = [
'@method',
str_replace(['self', 'static'], 'Carbon', $returnType),
"$method($parameters)",
$doc[0],
];
for ($i = 1; $i < \count($doc); $i++) {
$staticMethods[] = ['', '', '', $doc[$i]];
}
}
if (!method_exists(FactoryImmutable::class, $method)) {
$staticImmutableMethods[] = [
'@method',
str_replace(['self', 'static'], 'CarbonImmutable', $returnType),
"$method($parameters)",
$doc[0],
];
for ($i = 1; $i < \count($doc); $i++) {
$staticImmutableMethods[] = ['', '', '', $doc[$i]];
}
}
}
$return = getMethodReturnType($function);
if (!empty($methodDocBlock)) {
$methodDocBlock = "\n $methodDocBlock";
} elseif (isset($nativeMethods[$method])) {
$link = strtolower($method);
$methodDocBlock = "\n /**\n".
" * Calls DateTime::$method if mutable or DateTimeImmutable::$method else.\n".
" *\n".
" * @see https://php.net/manual/en/datetime.$link.php\n".
' */';
}
if (str_contains($return, 'self') && $phpLevel < 7.4) {
$return = '';
}
if ($method === '__toString' && $phpLevel < 8) {
$return = '';
}
if (method_exists($function, 'getAttributes') && ($attributes = $function->getAttributes())) {
foreach ($attributes as $attribute) {
$methodDocBlock .= "\n #[".$attribute->getName().']';
}
}
if (!\in_array($method, $noInterface)) {
$methods .= "\n$methodDocBlock\n public$static function $method($parameters)$return;";
}
}
$files->$interface = strtr(preg_replace_callback(
'/(\/\/ <methods[\s\S]*>)([\s\S]+)(<\/methods>)/mU',
static fn ($matches) => "{$matches[1]}$methods\n\n // {$matches[3]}",
$files->$interface,
1,
), [
'|CarbonInterface' => '|self',
'CarbonInterface::TRANSLATE_ALL' => 'self::TRANSLATE_ALL',
]);
$factories = [
__DIR__.'/src/Carbon/Factory.php' => $staticMethods,
__DIR__.'/src/Carbon/FactoryImmutable.php' => $staticImmutableMethods,
];
foreach ($factories as $file => $methods) {
$autoDoc = compileDoc($methods, $file);
$content = file_get_contents($file);
$files->$file = preg_replace_callback(
'/(<autodoc[\s\S]*>)([\s\S]+)(<\/autodoc>)/mU',
static fn ($matches) => "{$matches[1]}\n *$autoDoc\n *\n * {$matches[3]}",
$content,
1,
);
}
foreach ($files as $file => $contents) {
file_put_contents($file, $contents);
}
================================================
FILE: phpmd.xml
================================================
<?xml version="1.0"?>
<ruleset
name="Mess detection rules for Carbon"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0
http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"
>
<description>
Mess detection rules for Carbon
</description>
<rule ref="rulesets/codesize.xml">
<exclude name="CyclomaticComplexity" />
<exclude name="NPathComplexity" />
<exclude name="ExcessiveMethodLength" />
<exclude name="ExcessiveClassLength" />
<exclude name="ExcessivePublicCount" />
<exclude name="TooManyMethods" />
<exclude name="TooManyPublicMethods" />
<exclude name="ExcessiveClassComplexity" />
</rule>
<rule ref="rulesets/cleancode.xml">
<exclude name="BooleanArgumentFlag" />
<exclude name="StaticAccess" />
<exclude name="IfStatementAssignment" />
<exclude name="UndefinedVariable" />
<exclude name="ErrorControlOperator" />
</rule>
<rule ref="rulesets/controversial.xml" />
<rule ref="rulesets/design.xml">
<exclude name="EvalExpression" />
<exclude name="CouplingBetweenObjects" />
<exclude name="CountInLoopExpression" />
<exclude name="DevelopmentCodeFragment" />
</rule>
<rule ref="rulesets/design.xml/DevelopmentCodeFragment">
<properties>
<property name="ignore-namespaces" value="true" />
</properties>
</rule>
<rule ref="rulesets/naming.xml">
<exclude name="ShortVariable" />
<exclude name="LongVariable" />
<exclude name="ShortMethodName" />
</rule>
<rule ref="rulesets/naming.xml/ShortVariable">
<properties>
<property name="exceptions" value="ci,id,to,tz" />
</properties>
</rule>
<rule ref="rulesets/naming.xml/LongVariable">
<properties>
<property name="subtract-suffixes" value="Enabled,Function,Factory,Timezone,FloorEnd,DiffOptions,FromTestNow" />
</properties>
</rule>
<rule ref="rulesets/naming.xml/ShortMethodName">
<properties>
<property name="exceptions" value="eq,gt,is,lt,ne,to,tz" />
</properties>
</rule>
<rule ref="rulesets/unusedcode.xml" />
</ruleset>
================================================
FILE: phpstan.neon
================================================
parameters:
scanFiles:
- lazy/Carbon/MessageFormatter/MessageFormatterMapperStrongType.php
- lazy/Carbon/TranslatorStrongType.php
- lazy/Carbon/UnprotectedDatePeriod.php
- tests/Fixtures/DateMalformedIntervalStringException.php
- tests/Fixtures/DateMalformedStringException.php
- vendor/autoload.php
level: 3
paths:
- src
- tests
parallel:
processTimeout: 300.0
ignoreErrors:
- identifier: varTag.nativeType
- identifier: return.type
paths:
- tests/Carbon/TestingAidsTest.php
- '#^Call to static method get\(\) on an unknown class Symfony\\Component\\Translation\\PluralizationRules\.$#'
- '#^Call to an undefined static method#'
- '#^Call to an undefined method Carbon\\Carbon(Immutable)?::floatDiffIn([A-Za-z]+)\(\)\.$#'
- '#^Call to an undefined method Carbon\\Carbon(Immutable)?::(diffInBusinessDays|diffInReal([A-Za-z]+))\(\)\.$#'
- '#^Call to an undefined method Carbon\\Carbon(Immutable)?::(add|sub)Real([A-Za-z]+)\(\)\.$#'
- '#^Unsafe usage of new static\(\)\.$#'
- '#^Method Carbon\\Carbon(Interface|Immutable)?::(add|sub)[A-Z][A-Za-z]+\(\) invoked with 1 parameter, 0 required\.$#'
- '#^Call to an undefined method Carbon\\Carbon(Interface|Immutable)?::(super|noThis|toAppTz|copyWithAppTz)\(\)\.$#'
- '#^Call to an undefined method Carbon\\CarbonInterval::(multiply|andAgain|copyAndAgain)\(\)\.$#'
- '#^Call to an undefined method Carbon\\CarbonPeriod::(oneMoreDay|copyOneMoreDay|endNextDay)\(\)\.$#'
- '#should return (\S*)(static|\$this)\(Carbon\\Carbon\)(\|null)? but returns Carbon\\Carbon(Interface)?(\|null)?\.$#'
- '#should return (\S*)(static|\$this)\(Carbon\\CarbonImmutable\)(\|null)? but returns Carbon\\Carbon(Immutable|Interface)(\|null)?\.$#'
- '#should return (\S*)\$this\(Carbon\\CarbonInterval\)(\|null)? but returns static\(Carbon\\CarbonInterval\)(\|null)?\.$#'
- '#should return (\S*)static\(Carbon\\CarbonInterval\)(\|null)? but returns Carbon\\CarbonInterval(\|null)?\.$#'
- '#^Call to an undefined method DateInterval::(spec|optimize)\(\)\.$#'
- '#^Property Carbon\\Carbon::\$timezone \(Carbon\\CarbonTimeZone\) does not accept string\.$#'
-
message: '#^Variable \$this in isset\(\) always exists and is not nullable\.$#'
paths:
- src/Carbon/Traits/Mixin.php
-
message: '#^Call to an undefined method Carbon\\Carbon::[a-zA-Z]+Of[a-zA-Z]+\(\)\.$#'
paths:
- tests/Carbon/SettersTest.php
-
message: "#^Property Carbon\\\\Carbon\\:\\:\\$month \\(int\\) does not accept Carbon\\\\Month\\:\\:February\\.$#"
paths:
- tests/Carbon/SettersTest.php
-
message: '#^Access to an undefined property Carbon\\CarbonImmutable::\$[a-zA-Z]+\.$#'
paths:
- tests/CarbonImmutable/GettersTest.php
-
message: '#^Call to an undefined method Carbon\\CarbonImmutable::[a-zA-Z]+Of[a-zA-Z]+\(\)\.$#'
paths:
- tests/CarbonImmutable/GettersTest.php
-
message: '#^Access to an undefined property Carbon\\CarbonInterval::\$tz_?[Nn]ame\.$#'
paths:
- tests/CarbonInterval/GettersTest.php
- tests/CarbonInterval/SettersTest.php
-
message: '#^Access to an undefined property Carbon\\CarbonPeriod::\$(include)?(Start|End)Date\.$#'
paths:
- tests/CarbonPeriod/GettersTest.php
-
message: '#^Access to protected property Carbon\\CarbonPeriod::\$endDate\.$#'
paths:
- tests/CarbonPeriod/GettersTest.php
-
message: '#^Cannot access property \$locale on Carbon\\CarbonPeriod\|string\.$#'
paths:
- tests/CarbonPeriod/GettersTest.php
-
message: '#^Access to protected property Carbon\\CarbonPeriod::\$startDate\.$#'
paths:
- tests/CarbonPeriod/GettersTest.php
-
message: '#^Access to an undefined property Carbon\\CarbonPeriod::\$locale\.$#'
paths:
- tests/CarbonPeriod/GettersTest.php
-
message: '#^Parameter \$foo of anonymous function has invalid type Tests\\Factory\\FooBar\.#'
paths:
- tests/Factory/CallbackTest.php
-
message: '#^Call to an undefined method SubCarbon(Immutable)?::diffInDecades\(\)\.#'
paths:
- tests/Carbon/MacroTest.php
- tests/CarbonImmutable/MacroTest.php
-
message: '#^Call to an undefined method Doctrine\\DBAL\\Types\\Type::requiresSQLCommentHint\(\)\.#'
paths:
- tests/Doctrine/CarbonTypesTest.php
-
message: '#^Instantiated class Doctrine\\DBAL\\Platforms\\MySQL57Platform not found\.#'
paths:
- tests/Doctrine/CarbonTypesTest.php
-
message: '#^Call to an undefined method Symfony\\Contracts\\Translation\\TranslatorInterface::getMessages\(\)\.#'
paths:
- tests/CarbonInterval/ConstructTest.php
-
message: '#^Access to protected property Carbon\\CarbonPeriod::\$dateInterval\.#'
paths:
- tests/CarbonPeriod/CreateTest.php
excludePaths:
- '*/src/Carbon/CarbonPeriod.php'
- '*/src/Carbon/Laravel/ServiceProvider.php'
- '*/src/Carbon/TranslatorWeakType.php'
- '*/src/Carbon/PHPStan/*'
- '*/tests/Carbon/Fixtures/DumpCarbon.php'
- '*/tests/Carbon/LocalizationTest.php'
- '*/tests/Carbon/SerializationTest.php'
- '*/tests/Carbon/LastErrorTest.php'
- '*/tests/CarbonImmutable/LocalizationTest.php'
- '*/tests/CarbonImmutable/SetStateTest.php'
- '*/tests/CarbonImmutable/SerializationTest.php'
- '*/tests/CarbonImmutable/LastErrorTest.php'
- '*/tests/Laravel/*.php'
- '*/tests/Cli/*.php'
- '*/tests/Carbon/Fixtures/NoLocaleTranslator.php'
- '*/tests/CarbonPeriod/Fixtures/filters.php'
- '*/tests/Fixtures/dynamicInterval.php'
- '*/tests/PHPStan/*.php'
- '*/tests/PHPUnit/AssertObjectHasPropertyPolyfillTrait.php'
================================================
FILE: phpunit.xml.dist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
bootstrap="tests/bootstrap.php"
colors="true"
cacheDirectory=".phpunit.cache"
>
<coverage/>
<testsuites>
<testsuite name="carbon">
<directory>tests/Carbon</directory>
<directory>tests/CommonTraits</directory>
</testsuite>
<testsuite name="immutable">
<directory>tests/CarbonImmutable</directory>
</testsuite>
<testsuite name="interval">
<directory>tests/CarbonInterval</directory>
</testsuite>
<testsuite name="period">
<directory>tests/CarbonPeriod</directory>
</testsuite>
<testsuite name="period-immutable">
<directory>tests/CarbonPeriodImmutable</directory>
</testsuite>
<testsuite name="timezone">
<directory>tests/CarbonTimeZone</directory>
</testsuite>
<testsuite name="localization">
<directory>tests/Localization</directory>
</testsuite>
<testsuite name="laravel">
<directory>tests/Laravel</directory>
</testsuite>
<testsuite name="doctrine">
<directory>tests/Doctrine</directory>
</testsuite>
<testsuite name="factory">
<directory>tests/Factory</directory>
</testsuite>
<testsuite name="language">
<directory>tests/Language</directory>
</testsuite>
<testsuite name="jenssegers">
<directory>tests/Jenssegers</directory>
</testsuite>
<testsuite name="cli">
<directory>tests/Cli</directory>
</testsuite>
<testsuite name="phpstan">
<directory>tests/PHPStan</directory>
</testsuite>
<testsuite name="unit">
<directory>tests/Unit</directory>
</testsuite>
</testsuites>
<php>
<ini name="max_execution_time" value="900" />
</php>
<source>
<include>
<directory suffix=".php">src/Carbon</directory>
</include>
<exclude>
<file>src/Carbon/PHPStan/Macro.php</file>
<file>src/Carbon/Translator.php</file>
<file>src/Carbon/TranslatorStrongType.php</file>
<file>src/Carbon/TranslatorWeakType.php</file>
</exclude>
</source>
</phpunit>
================================================
FILE: psalm.xml
================================================
<?xml version="1.0"?>
<psalm
errorLevel="5"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
findUnusedBaselineEntry="true"
findUnusedCode="true"
>
<projectFiles>
<directory name="src" />
<file name="lazy/Carbon/UnprotectedDatePeriod.php" />
<file name="lazy/Carbon/TranslatorStrongType.php" />
<file name="lazy/Carbon/MessageFormatter/MessageFormatterMapperStrongType.php" />
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
</psalm>
================================================
FILE: readme.md
================================================
# Carbon
[](https://packagist.org/packages/nesbot/carbon)
[](https://packagist.org/packages/nesbot/carbon)
[](https://github.com/CarbonPHP/carbon/actions)
[](https://codecov.io/github/CarbonPHP/carbon/actions?branch=master)
An international PHP extension for DateTime. [Documentation](https://carbonphp.github.io/carbon/)
> [!NOTE]
> We're migrating the repository from [briannesbitt/Carbon](https://github.com/briannesbitt/Carbon) to [CarbonPHP/carbon](https://github.com/CarbonPHP/carbon),
> which means if you're looking specific issues/pull-requests, you may have to search both. No other impact as code on both will be kept up to date.
```php
<?php
use Carbon\Carbon;
printf("Right now is %s", Carbon::now()->toDateTimeString());
printf("Right now in Vancouver is %s", Carbon::now('America/Vancouver')); //implicit __toString()
$tomorrow = Carbon::now()->addDay();
$lastWeek = Carbon::now()->subWeek();
$officialDate = Carbon::now()->toRfc2822String();
$howOldAmI = Carbon::createFromDate(1975, 5, 21)->age;
$noonTodayLondonTime = Carbon::createFromTime(12, 0, 0, 'Europe/London');
$internetWillBlowUpOn = Carbon::create(2038, 01, 19, 3, 14, 7, 'GMT');
// Don't really want this to happen so mock now
Carbon::setTestNow(Carbon::createFromDate(2000, 1, 1));
// comparisons are always done in UTC
if (Carbon::now()->gte($internetWillBlowUpOn)) {
die();
}
// Phew! Return to normal behaviour
Carbon::setTestNow();
if (Carbon::now()->isWeekend()) {
echo 'Party!';
}
// Over 200 languages (and over 500 regional variants) supported:
echo Carbon::now()->subMinutes(2)->diffForHumans(); // '2 minutes ago'
echo Carbon::now()->subMinutes(2)->locale('zh_CN')->diffForHumans(); // '2分钟前'
echo Carbon::parse('2019-07-23 14:51')->isoFormat('LLLL'); // 'Tuesday, July 23, 2019 2:51 PM'
echo Carbon::parse('2019-07-23 14:51')->locale('fr_FR')->isoFormat('LLLL'); // 'mardi 23 juillet 2019 14:51'
// ... but also does 'from now', 'after' and 'before'
// rolling up to seconds, minutes, hours, days, months, years
$daysSinceEpoch = Carbon::createFromTimestamp(0)->diffInDays(); // something such as:
// 19817.6771
$daysUntilInternetBlowUp = $internetWillBlowUpOn->diffInDays(); // Negative value since it's in the future:
// -5037.4560
// Without parameter, difference is calculated from now, but doing $a->diff($b)
// it will count time from $a to $b.
Carbon::createFromTimestamp(0)->diffInDays($internetWillBlowUpOn); // 24855.1348
```
## Installation
### With Composer
```
$ composer require nesbot/carbon
```
```json
{
"require": {
"nesbot/carbon": "^3"
}
}
```
```php
<?php
require 'vendor/autoload.php';
use Carbon\Carbon;
printf("Now: %s", Carbon::now());
```
### Without Composer
Why are you not using [composer](https://getcomposer.org/)? Download the Carbon [latest release](https://github.com/CarbonPHP/carbon/releases) and put the contents of the ZIP archive into a directory in your project. Then require the file `autoload.php` to get all classes and dependencies loaded on need.
```php
<?php
require 'path-to-Carbon-directory/autoload.php';
use Carbon\Carbon;
printf("Now: %s", Carbon::now());
```
## Documentation
[https://carbonphp.github.io/carbon/](https://carbonphp.github.io/carbon/)
## Security contact information
To report a security vulnerability, please use the
[Tidelift security contact](https://tidelift.com/security).
Tidelift will coordinate the fix and disclosure.
## Credits
### Contributors
This project exists thanks to all the people who contribute.
<a href="https://github.com/CarbonPHP/carbon/graphs/contributors" target="_blank"><img src="https://opencollective.com/Carbon/contributors.svg?width=890&button=false" /></a>
### Translators
[Thanks to people helping us to translate Carbon in so many languages](https://carbonphp.github.io/carbon/develop/translations/translators.html)
### Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website.
<!-- <open-collective-sponsors> -->
<a title="Нова українська букмекерська контора" href="https://betking.com.ua/sports-book/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Ставки на спорт" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/c56d2fe2-f9fb-4d63-947c-77575f4b15c6/stavki.jpg" width="96" height="96"></a>
<a title="Онлайн казино 777 Україна" href="https://777.ua/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Онлайн казино 777" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/7e572d50-1ce8-4d69-ae12-86cc80371373/ok-ua-777.png" width="96" height="96"></a>
<a title="Non GamStop Bookies UK" href="https://netto.co.uk/betting-sites-not-on-gamstop/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Non GamStop Bookies UK" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/51bfaa05-02b3-4cd9-b1a4-9d0d8f34cbae/%D0%97%D0%BD%D1%96%D0%BC%D0%BE%D0%BA%20%D0%B5%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%202025-07-04%20%D0%BE%2015.21.16%20(1)%20(1)%20(1).jpg" width="126" height="96"></a>
<a title="Best non Gamstop sites in the UK" href="https://www.pieria.co.uk/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Best non Gamstop sites in the UK" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/34e340b8-e1de-4932-8a76-1b3ce2ec7ee8/logo_white%20bg%20(8).png" width="96" height="96"></a>
<a title="Trusted last mile route planning and route optimization" href="https://route4me.com/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Route4Me Route Planner" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/237386c3-48a2-47c6-97ac-5f888cdb4cda/Route4MeIconLogo.png" width="96" height="96"></a>
<a title="Bei Releaf erhalten Sie schnell und diskret Ihr Cannabis Rezept online. Unsere Ärzte prüfen Ihre Angaben und stellen bei Eignung das Rezept aus. Anschließend können Sie legal und sicher medizinisches Cannabis über unsere Partnerapotheken kaufen." href="https://releaf.com/de?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Releaf – Medizinischer Cannabis Shop" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/b686d646-5029-4b4c-8cab-9645ab2679de/9da596d1-f48a-41ec-947d-a64dd8e7529c.png" width="96" height="96"></a>
<a title="Buitenlandse Online Casino" href="https://nl.trustpilot.com/review/buitenlandsecasino.vip?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Buitenlandse Online Casino" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/9465308a-8e44-4606-af5d-5a81a3c6567b/ChatGPT%20Image%20Nov%2015%2C%202025%2C%2002_53_25%20PM.png" width="96" height="96"></a>
<a title="Online Casino Zonder Registratie" href="https://nl.trustpilot.com/review/zonderregistratiecasinos.com?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Online Casino Zonder Registratie" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/cf382ddc-627b-4bd9-8870-43ee28d2a628/casino-zonder-registratie.png" width="127.5" height="96"></a>
<a title="Mi misión es la educación y transparencia en el mundo de los casinos online" href="https://www.educatransparencia.cl/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Transparencia en Casinos Online" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/c034fdcb-1d17-4c83-8105-f3cfa4f874d6/educalogocito.png" width="192" height="96"></a>
<a title="Wildflower" href="https://www.trustpilot.com/review/wildflower.uno?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Wildflower" src="https://images.opencollective.com/wildflower_cases/avatar/256.png" width="96" height="96"></a>
<a title="gaia-wines.gr" href="https://www.gaia-wines.gr/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="gaia-wines.gr" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/a9b971ee-db5f-4400-8c4b-76cf9bc35015/IMAGE%202024-06-14%2013%3A54%3A14.jpg" width="96" height="96"></a>
<a title="#1 Guide To Online Gambling In Canada" href="https://casinohex.org/canada/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="CasinoHex Canada" src="https://opencollective-production.s3.us-west-1.amazonaws.com/79fdbcc0-a997-11eb-abbc-25e48b63c6dc.jpg" width="127.5" height="96"></a>
<a title="We specialize in the online gambling industry, helping players access reliable and verified information about the best online casinos and pokies in Australia. Our team tests casinos and games, collects user reviews from Trustpilot, and organizes them in o" href="https://au.trustpilot.com/review/bestpayidpokies.net?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="PayID Pokies" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/985a0ae7-54c3-4680-8816-bc8d656f7562/payidpokies.png" width="64" height="64"></a>
<a title="iDealeCasinos" href="https://idealecasinos.nl/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="iDealeCasinos" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/907841d3-435e-44b4-9684-c33fd8635ece/ideale-casinos-square-white-logo-300.png" width="64" height="64"></a>
<a title="TopRating.casino ➢ Гід по онлайн-казино в Україні" href="https://toprating.casino/ua/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Top Rating casino" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/fec14fc4-85b1-4fdc-971e-e8aabfc60926/toprating%20logo.jpg" width="64" height="64"></a>
<a title="Porównanie kasyn online w Polsce. Darmowe automaty online." href="https://onlinekasyno-polis.pl/" target="_blank"><img alt="Online Kasyno Polis" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/12fe53d4-b2e4-4601-b9ea-7b652c414a38/274px%20274px-2.png" width="64" height="64"></a>
<a title="Find the best Interac online casinos in Canada with secure payments, exclusive bonuses, and fast withdrawals." href="https://interac-casino.com/en-ca/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Interac-casino.com - Canada" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/865d9613-74db-45b6-9f33-3ba992682259/2025-09-10%2019.33.08.jpg" width="64" height="64"></a><details><summary>See more</summary>
<a title="OnlineCasinosSpelen" href="https://onlinecasinosspelen.com?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="OnlineCasinosSpelen" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/47e87426-6a55-4f69-9fb5-4e5032dc35a8/5d10dd22-320e-47d4-84e6-d144874f1f5f.png" width="64" height="64"></a>
<a title="Betwinner is an online bookmaker offering sports betting, casino games, and more." href="https://guidebook.betwinner.com/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Guidebook.BetWinner" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/82cab29a-7002-4924-83bf-2eecb03d07c4/0x0.png" width="64" height="64"></a>
<a title="Discover the Top 10 Online Casino Australia sites for fast payouts, big bonuses, and top real money pokies" href="https://au.trustpilot.com/review/top-10-online-casino-australia.com?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Top 10 Casino Australia" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/cd3f2230-ca38-41e1-9f31-f3069b910be3/top-10-online-casino-aus.jpg" width="64" height="64"></a>
<a title="We test dozens of casinos every month and select the coolest ones for Australian players." href="https://au.trustpilot.com/review/payid-casino.net?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="PayID Pokies Sites" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/ecd8a5f4-fd86-4903-a512-cbfaff35e7ef/payidpokiessites.png" width="69" height="64"></a>
<a title="We collect all reviews about the best online pokies." href="https://au.trustpilot.com/review/aussiepokies.net?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Best Online Pokies in Australia" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/44d84116-8762-4167-9433-a9e5da542e29/pokies.png" width="64" height="64"></a>
<a title="Plinko Game" href="https://www.trustpilot.com/review/plinkoplay.top?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Plinko Game" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/5e953df9-1876-45b6-9ffc-f2009804935b/plinkoo.png" width="64" height="64"></a>
<a title="Онлайн казино casino.ua" href="https://casino.ua/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Онлайн казино casino.ua" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/32790ee6-245b-45bd-acf7-7a661fe2cf9f/logo.png" width="64" height="64"></a>
<a title="Real Money Pokies" href="https://onlinecasinoskiwi.co.nz/real-money-pokies/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Real Money Pokies" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/d0f7382e-32ea-4425-a8c4-3019f9ed501c/NZ_logo%20(6)%20(2).jpg" width="64" height="64"></a>
<a title="Uudet Nettikasinot" href="https://fi.parhaatuudetkasinot.com/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="parhaatuudetkasinot.com" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/09e109d6-8ad2-4ade-ab24-4427028c8e38/260bfa9d-6a5c-494d-9ec0-a624327429ae.png" width="64" height="64"></a>
<a title="New Casino Bonuses" href="https://newcasinobonuses.gb.net/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="New Casino Bonuses" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/38e356d8-3597-406a-a263-1c348723aa17/new_casino_bonuses_logo.png" width="64" height="64"></a>
<a title="Best online sports betting and casino company." href="https://global.fun88.com/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Fun88" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/1688ebca-4984-4b9b-a24d-8fdd1233892f/fun88-logo.png" width="64" height="64"></a>
<a title="Top 50 Online Casinos UK" href="https://eastvillafc.co.uk?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="East Villa FC" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/2560f1b5-20d6-4cf4-83cd-2457bf111fc3/trophy-fav-blue.png" width="64" height="64"></a>
<a title="Instant withdrawal casino" href="https://au.trustpilot.com/review/quickcashoutcasinos.com?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Instant withdrawal casino" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/e4be26b6-a57a-4758-ad56-bd31c759465e/quickcashoutcasinos2.png" width="75" height="64"></a>
<a title="Best online sports betting company in Thailand." href="https://www.fun88thh.com/th/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Fun88 Thailand" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/bbf7174c-fc01-4ce6-86b5-f621e350969d/fun88-logo.png" width="64" height="64"></a>
<a title="Best online sports betting company in Vietnam." href="https://vi.fun88.com/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Fun88 Vietnam" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/ed704e1d-3894-48bb-83e3-6094b2c68a5c/fun88-logo.png" width="64" height="64"></a>
<a title="Casino ohne oasis" href="https://de.trustpilot.com/review/onlinecasinoohneoasis.me?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Casino ohne oasis" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/f59e1e3a-6378-4aa7-91f5-6934a58bc21d/oasis.png" width="64" height="64"></a>
<a title="Najlepsi Bukmacherzy" href="https://najlepsibukmacherzy.pl/ranking-legalnych-bukmacherow/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Najlepsi Bukmacherzy" src="https://opencollective-production.s3.us-west-1.amazonaws.com/81588eb0-608a-11eb-ad1c-b119533ac7bb.png" width="64" height="64"></a>
<a title="Offshore bookmakers review site." href="https://www.sportsbookreviewsonline.com/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Sportsbook Reviews Online" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/6d499f24-d669-4fc6-bb5f-b87184aa7963/sportsbookreviewsonline_com.png" width="42" height="42"></a>
<a title="Ставки на спорт Favbet" href="https://www.favbet.ua/uk/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Ставки на спорт Favbet" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/d86d313e-7b17-42fa-8b76-3f17fbf681a2/favbet-logo.jpg" width="42" height="42"></a>
<a title="Get professional support for Carbon" href="https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=docs" target="_blank"><img alt="Tidelift" src="https://carbonphp.github.io/carbon/sponsors/tidelift-brand.png" width="84" height="42"></a>
<a title="Casino-portugal.pt" href="https://casino-portugal.pt/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Casino-portugal.pt" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/870b4bd0-b6aa-4129-9827-e8ac02cfde56/167bdc1d-0a19-414d-a288-cfc3278b388f.png" width="42" height="42"></a>
<a title="https://play-fortune.pl/kasyno/z-minimalnym-depozytem/" href="https://play-fortune.pl/kasyno/z-minimalnym-depozytem/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="https://play-fortune.pl/kasyno/z-minimalnym-depozytem/" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/cbeea308-5148-4f6c-ac6e-dbfa029aadd1/PL.png" width="42" height="42"></a>
<a title="Playfortune.net.br" href="https://playfortune.net.br/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Playfortune.net.br" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/bf7ba31d-648c-470f-bf7e-2293c5ca0509/62a0353e-3858-41f1-bbb3-597449949e66.png" width="42" height="42"></a>
<a title="Best Casinos not on Gamstop in the UK 2025" href="https://www.vso.org.uk/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="best non Gamstop casinos" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/3f48874e-f2f6-4062-a2a2-1500677ee3d9/125%D1%85125%20(1).jpg" width="42" height="42"></a>
<a title="Znajdź najlepsze zakłady bukmacherskie w Polsce w 2023 roku. Probukmacher.pl to Twoje kompendium wiedzy na temat bukmacherów!" href="https://www.probukmacher.pl?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Probukmacher" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/caf50271-4560-4ffe-a434-ea15239168db/Screenshot_1.png" width="58" height="42"></a>
<a title="BetPokies NZ features top fast payout casinos where winnings are processed within hours. The speed depends on the casino and payment method, with the platform highlighting the best options for smooth, reliable play." href="https://betpokies.co.nz/casinos/fast-payout?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Fastest Payout Online Casino" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/37cba042-a941-4bfd-87c4-b4f4c1a98641/7912b3ee-3c62-4ebd-b435-6a9a88b2228b.png" width="42" height="42"></a>
<a title="Онлайн казино та БК (ставки на спорт) в Україні" href="https://betking.com.ua/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="betking онлайн казино" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/08587758-582c-4136-aba5-2519230960d3/betking.jpg" width="42" height="42"></a>
<a title="inkedin" href="https://inkedin.com?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="inkedin" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/6cb31863-b725-49c5-820c-2c2be7d54adf/cc930e12-04de-4574-9cca-171e07d277c3.png" width="42" height="42"></a>
<a title="Best-betting.net is an Indian website where you can always find interesting, useful, and up-to-date information about cricket and other sports. Additionally, on our portal, you can explore predictions and betting opportunities for the most exciting sports" href="https://best-betting.net/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Best Betting" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/4b437e94-747c-4cf5-be67-d11bf8472d76/bestbetting-logo-cover.png" width="42" height="42"></a>
<a title="Best PayID Pokies in Australia" href="https://ausgambler.net/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="AusGambler" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/b120ff74-a4cc-4e25-a96f-2b040d60de14/payidgambler.png" width="42" height="42"></a>
<a title="Актуальний та повносправний рейтинг онлайн казино України, ґрунтований на відгуках реальних гравців." href="https://uk.onlinecasino.in.ua/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Онлайн казино України" src="https://opencollective-production.s3.us-west-1.amazonaws.com/c0b4b090-eef8-11ec-9cb7-0527a205b226.png" width="42" height="42"></a>
<a title="Post-production resource scheduling app" href="https://freispace.com/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="freispace" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/7d553b00-78ff-4442-91dd-33c220e82ac4/freispace-icon-inverted.png" width="42" height="42"></a>
<a title="bestecasinozondercruks" href="https://nl.trustpilot.com/review/bestecasinozondercruks.online?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="bestecasinozondercruks" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/4948eca9-abd5-49ea-bb70-1ea6053f8663/ChatGPT%20Image%20Dec%2027%2C%202025%2C%2010_22_47%20PM-min.png" width="42" height="42"></a>
<a title="Slots City® ➢ Лучшее лицензионно казино онлайн и оффлайн на гривны в Украине. 【 Более1500 игровых автоматов и слотов】✅ Официально и Безопасно" href="https://slotscity.ua/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Slots City" src="https://opencollective-production.s3.us-west-1.amazonaws.com/d7e298c0-7abe-11ed-8553-230872f5e54d.png" width="59" height="42"></a>
<a title="Run Weekly" href="https://www.runweekly.com/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Run Weekly" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/4d7e1fad-f160-4b64-ab41-d493023f9369/2de8e56c-e9fa-497c-8882-3736ec946664.png" width="42" height="42"></a>
<a title="Are you looking for the latest online casino sites to play in the UK? How about ones that actually deliver on their promises? Every year new online casinos pops up, but are they worth your time? Check out https://helpdirect.org.uk" href="https://helpdirect.org.uk/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="New Casino Sites UK (2025) Help Direct" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/d5e8c98f-7df3-40e8-bfe1-3c1583222eab/help-direct-logo-white-trans.png" width="42" height="42"></a>
<a title="UnAIMyText" href="https://unaimytext.com/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="UnAIMyText" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/fa5b36d5-69e6-44a4-bbdf-b5d264399365/icon_resized.png" width="42" height="42"></a>
<a title="Online Casino utan Svensk licens" href="https://se.trustpilot.com/review/casino-utan-svensk-licens-se.se?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="Online Casino utan Svensk licens" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/64a7a6b0-e843-4cc2-a04e-0e829ccade58/logose.png" width="42" height="42"></a>
<a title="TopKasynoOnline PL" href="https://pl.topkasynoonline.com/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img alt="TopKasynoOnline PL" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/6cdee969-d731-44d6-b8ff-fc4f6d4dab9c/TKOlogo.png" width="42" height="42"></a>
<a title="ssddanbrown" href="https://github.com/ssddanbrown" target="_blank"><img alt="ssddanbrown" src="https://avatars.githubusercontent.com/u/8343178?s=128&v=4" width="42" height="42"></a></details><!-- </open-collective-sponsors> -->
[[See all](https://carbonphp.github.io/carbon/#sponsors)]
[[Become a sponsor via OpenCollective*](https://opencollective.com/Carbon#sponsor)]
[[Become a sponsor via GitHub*](https://github.com/sponsors/kylekatarnls)]
<small>* This is a donation. No goods or services are expected in return. Any requests for refunds for those purposes will be rejected.</small>
### Backers
Thank you to all our backers! 🙏
<a href="https://opencollective.com/Carbon#backers" target="_blank"><img src="https://opencollective.com/Carbon/backers.svg?width=890&version=2023-06-08-07-12"></a>
[[Become a backer](https://opencollective.com/Carbon#backer)]
## Carbon for enterprise
Available as part of the Tidelift Subscription.
The maintainers of ``Carbon`` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
================================================
FILE: sponsors.php
================================================
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Carbon\CarbonImmutable;
require_once __DIR__.'/vendor/autoload.php';
function getMaxHistoryMonthsByAmount($amount): int
{
if ($amount >= 50) {
return 6;
}
if ($amount >= 20) {
return 4;
}
return 2;
}
function getHtmlAttribute($rawValue): string
{
return str_replace(
['', "\r"],
'',
trim(htmlspecialchars((string) $rawValue), " \n\r\t\v\0"),
);
}
function getOpenCollectiveSponsors(): string
{
$customSponsorOverride = [
// For consistency and equity among sponsors, as of now, we kindly ask our sponsors
// to provide an image having a width/height ratio between 1/1 and 2/1.
// By default, we'll show the member picture from OpenCollective, and will resize it if bigger
662698 => [
// alt attribute
'name' => 'Non Gamstop Casinos',
// title attribute
'description' => 'Casinos not on Gamstop',
// src attribute
'image' => 'https://lgcnews.com/wp-content/uploads/2018/01/LGC-logo-v8-temp.png',
// href attribute
'website' => 'https://lgcnews.com/',
],
663069 => [
// alt attribute
'name' => 'Ставки на спорт Favbet',
// href attribute
'website' => 'https://www.favbet.ua/uk/',
],
676798 => [
// alt attribute
'name' => 'Top Casinos Canada',
// title attribute
'description' => 'Top Casinos Canada',
// src attribute
'image' => 'https://topcasino.net/img/topcasino-logo-cover.png',
// href attribute
'website' => 'https://topcasino.net/',
],
];
$members = json_decode(file_get_contents('https://opencollective.com/carbon/members/all.json'), true);
foreach ($members as &$member) {
$member = array_merge($member, $customSponsorOverride[$member['MemberId']] ?? []);
}
// Adding sponsors paying via other payment methods
$members[] = [
'MemberId' => 1,
'createdAt' => '2019-01-01 02:00',
'type' => 'ORGANIZATION',
'role' => 'BACKER',
'tier' => 'backer+',
'isActive' => true,
'totalAmountDonated' => 1000,
'currency' => 'USD',
'lastTransactionAt' => CarbonImmutable::now()->format('Y-m-d').' 02:00',
'lastTransactionAmount' => 25,
'profile' => 'https://tidelift.com/',
'name' => 'Tidelift',
'description' => 'Get professional support for Carbon',
'image' => 'https://carbonphp.github.io/carbon/sponsors/tidelift-brand.png',
'website' => 'https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=docs',
];
$members[] = [
'MemberId' => 2,
'createdAt' => '2024-11-14 02:00',
'type' => 'ORGANIZATION',
'role' => 'BACKER',
'tier' => 'backer+ yearly',
'isActive' => true,
'totalAmountDonated' => 170,
'currency' => 'USD',
'lastTransactionAt' => '2024-11-14 02:00',
'lastTransactionAmount' => 170,
'profile' => 'https://www.slotozilla.com/nz/free-spins',
'name' => 'Slotozilla',
'description' => 'Slotozilla website',
'image' => 'https://carbonphp.github.io/carbon/sponsors/slotozilla.png',
'website' => 'https://www.slotozilla.com/nz/free-spins',
];
$list = array_filter($members, static fn (array $member): bool => $member['totalAmountDonated'] > 3 && $member['role'] !== 'HOST' && (
$member['totalAmountDonated'] > 100 ||
$member['lastTransactionAt'] > CarbonImmutable::now()
->subMonthsNoOverflow(getMaxHistoryMonthsByAmount($member['lastTransactionAmount']))
->format('Y-m-d h:i') ||
$member['isActive'] && $member['lastTransactionAmount'] >= 30
));
$list = array_map(static function (array $member): array {
$createdAt = CarbonImmutable::parse($member['createdAt']);
$lastTransactionAt = CarbonImmutable::parse($member['lastTransactionAt']);
if ($createdAt->format('d H:i:s.u') > $lastTransactionAt->format('d H:i:s.u')) {
$createdAt = $createdAt
->setDay($lastTransactionAt->day)
->modify($lastTransactionAt->format('H:i:s.u'));
}
$isYearly = str_contains(strtolower($member['tier'] ?? ''), 'yearly');
$monthlyContribution = (float) (
($isYearly && $lastTransactionAt > CarbonImmutable::parse('-1 year'))
? ($member['lastTransactionAmount'] / 11.2) // 11.2 instead of 12 to include the discount for yearly subscription
: ($member['totalAmountDonated'] / ceil($createdAt->floatDiffInMonths()))
);
if (!$isYearly) {
if (
$lastTransactionAt->isAfter('last month') &&
$member['lastTransactionAmount'] > $monthlyContribution
) {
$monthlyContribution = (float) $member['lastTransactionAmount'];
}
if ($lastTransactionAt->isBefore('-75 days')) {
$days = min(120, $lastTransactionAt->diffInDays('now') - 70);
$monthlyContribution *= 1 - $days / 240;
}
}
$yearlyContribution = (float) (
$isYearly
? (12 * $monthlyContribution)
: ($member['totalAmountDonated'] / max(1, $createdAt->floatDiffInYears()))
);
$status = null;
$rank = 0;
if ($monthlyContribution > 50 || $yearlyContribution > 900) {
$status = 'sponsor';
$rank = 5;
} elseif ($monthlyContribution > 29 || $yearlyContribution > 700) {
$status = 'sponsor';
$rank = 4;
} elseif ($monthlyContribution > 14.5 || $yearlyContribution > 500) {
$status = 'backerPlus';
$rank = 3;
} elseif ($monthlyContribution > 4.5 || $yearlyContribution > 80) {
$status = 'backer';
$rank = 2;
} elseif ($member['totalAmountDonated'] > 0) {
$status = 'helper';
$rank = 1;
}
return array_merge($member, [
'star' => ($monthlyContribution > 98 || $yearlyContribution > 800),
'status' => $status,
'rank' => $rank,
'monthlyContribution' => $monthlyContribution,
'yearlyContribution' => $yearlyContribution,
]);
}, $list);
usort($list, static function (array $a, array $b): int {
return ($b['star'] <=> $a['star'])
?: ($b['rank'] <=> $a['rank'])
?: ($b['monthlyContribution'] <=> $a['monthlyContribution'])
?: ($b['totalAmountDonated'] <=> $a['totalAmountDonated']);
});
$membersByUrl = [];
$output = '';
$extra = '';
foreach ($list as $member) {
$url = $member['website'] ?? $member['profile'];
if (isset($membersByUrl[$url]) || !\in_array($member['status'], ['sponsor', 'backerPlus'], true)) {
continue;
}
$membersByUrl[$url] = $member;
$href = htmlspecialchars($url);
$src = $customSponsorImages[$member['MemberId'] ?? ''] ?? $member['image'] ?? (strtr($member['profile'], ['https://opencollective.com/' => 'https://images.opencollective.com/']).'/avatar/256.png');
[$x, $y] = @getimagesize($src) ?: [0, 0];
$validImage = ($x && $y);
$src = $validImage ? htmlspecialchars($src) : 'https://opencollective.com/static/images/default-guest-logo.svg';
$height = match ($member['status']) {
'sponsor' => 64,
'backerPlus' => 42,
'backer' => 32,
default => 24,
};
$rel = match ($member['status']) {
'sponsor', 'backerPlus' => '',
default => ' rel="sponsored"',
};
$width = min($height * 2, $validImage ? round($x * $height / $y) : $height);
if (!str_contains($href, 'utm_source') && !preg_match('/^https?:\/\/(?:www\.)?(?:onlinekasyno-polis\.pl|zonaminecraft\.net|slotozilla\.com)(\/.*)?/', $href)) {
$href .= (!str_contains($href, '?') ? '?' : '&').'utm_source=opencollective&utm_medium=github&utm_campaign=Carbon';
}
$title = getHtmlAttribute(($member['description'] ?? null) ?: $member['name']);
$alt = getHtmlAttribute($member['name']);
if ($member['star']) {
$width *= 1.5;
$height *= 1.5;
}
$link = "\n".'<a title="'.$title.'" href="'.$href.'" target="_blank"'.$rel.'>'.
'<img alt="'.$alt.'" src="'.$src.'" width="'.$width.'" height="'.$height.'">'.
'</a>';
if ($member['rank'] >= 5) {
$output .= $link;
continue;
}
$extra .= $link;
}
$github = [
8343178 => 'ssddanbrown',
];
foreach ($github as $avatar => $user) {
$extra .= "\n".'<a title="'.$user.'" href="https://github.com/'.$user.'" target="_blank">'.
'<img alt="'.$user.'" src="https://avatars.githubusercontent.com/u/'.$avatar.'?s=128&v=4" width="42" height="42">'.
'</a>';
}
return $output.'<details><summary>See more</summary>'.$extra.'</details>';
}
file_put_contents('readme.md', preg_replace_callback(
'/(<!-- <open-collective-sponsors> -->)[\s\S]+(<!-- <\/open-collective-sponsors> -->)/',
static function (array $match): string {
return $match[1].getOpenCollectiveSponsors().$match[2];
},
file_get_contents('readme.md'),
));
================================================
FILE: src/Carbon/AbstractTranslator.php
================================================
<?php
declare(strict_types=1);
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon;
use Carbon\MessageFormatter\MessageFormatterMapper;
use Closure;
use ReflectionException;
use ReflectionFunction;
use ReflectionProperty;
use Symfony\Component\Translation\Formatter\MessageFormatterInterface;
use Symfony\Component\Translation\Loader\ArrayLoader;
use Symfony\Component\Translation\Translator as SymfonyTranslator;
use Throwable;
abstract class AbstractTranslator extends SymfonyTranslator
{
public const REGION_CODE_LENGTH = 2;
/**
* Translator singletons for each language.
*
* @var array
*/
protected static array $singletons = [];
/**
* List of custom localized messages.
*
* @var array
*/
protected array $messages = [];
/**
* List of custom directories that contain translation files.
*
* @var string[]
*/
protected array $directories = [];
/**
* Set to true while constructing.
*/
protected bool $initializing = false;
/**
* List of locales aliases.
*
* @var array<string, string>
*/
protected array $aliases = [
'me' => 'sr_Latn_ME',
'scr' => 'sh',
];
/**
* Return a singleton instance of Translator.
*
* @param string|null $locale optional initial locale ("en" - english by default)
*
* @return static
*/
public static function get(?string $locale = null): static
{
$locale = $locale ?: 'en';
$key = static::class === Translator::class ? $locale : static::class.'|'.$locale;
$count = \count(static::$singletons);
// Remember only the last 10 translators created
if ($count > 10) {
foreach (\array_slice(array_keys(static::$singletons), 0, $count - 10) as $index) {
unset(static::$singletons[$index]);
}
}
static::$singletons[$key] ??= new static($locale);
return static::$singletons[$key];
}
public function __construct($locale, ?MessageFormatterInterface $formatter = null, $cacheDir = null, $debug = false)
{
$this->initialize($locale, $formatter, $cacheDir, $debug);
}
/**
* Returns the list of directories translation files are searched in.
*/
public function getDirectories(): array
{
return $this->directories;
}
/**
* Set list of directories translation files are searched in.
*
* @param array $directories new directories list
*
* @return $this
*/
public function setDirectories(array $directories): static
{
$this->directories = $directories;
return $this;
}
/**
* Add a directory to the list translation files are searched in.
*
* @param string $directory new directory
*
* @return $this
*/
public function addDirectory(string $directory): static
{
$this->directories[] = $directory;
return $this;
}
/**
* Remove a directory from the list translation files are searched in.
*
* @param string $directory directory path
*
* @return $this
*/
public function removeDirectory(string $directory): static
{
$search = rtrim(strtr($directory, '\\', '/'), '/');
return $this->setDirectories(array_filter(
$this->getDirectories(),
static fn ($item) => rtrim(strtr($item, '\\', '/'), '/') !== $search,
));
}
/**
* Reset messages of a locale (all locale if no locale passed).
* Remove custom messages and reload initial messages from matching
* file in Lang directory.
*/
public function resetMessages(?string $locale = null): bool
{
if ($locale === null) {
$this->messages = [];
$this->catalogues = [];
$this->modifyResources(static function (array $resources): array {
foreach ($resources as &$list) {
array_splice($list, 1);
}
return $resources;
});
return true;
}
$this->assertValidLocale($locale);
foreach ($this->getDirectories() as $directory) {
$file = \sprintf('%s/%s.php', rtrim($directory, '\\/'), $locale);
$data = @include $file;
if ($data !== false) {
$this->messages[$locale] = $data;
unset($this->catalogues[$locale]);
$this->modifyResources(static function (array $resources) use ($locale): array {
unset($resources[$locale]);
return $resources;
});
$this->addResource('array', $this->messages[$locale], $locale);
return true;
}
}
return false;
}
/**
* Returns the list of files matching a given locale prefix (or all if empty).
*
* @param string $prefix prefix required to filter result
*
* @return array
*/
public function getLocalesFiles(string $prefix = ''): array
{
$files = [];
foreach ($this->getDirectories() as $directory) {
foreach (self::getPhpFilesInDirectory(rtrim($directory, '\\/'), $prefix) as $file) {
$files[] = $file;
}
}
return array_unique($files);
}
/**
* Returns the list of internally available locales and already loaded custom locales.
* (It will ignore custom translator dynamic loading.)
*
* @param string $prefix prefix required to filter result
*
* @return array
*/
public function getAvailableLocales(string $prefix = ''): array
{
return array_unique(array_merge(
array_map(
static fn (string $file) => substr($file, strrpos($file, '/') + 1, -4),
$this->getLocalesFiles($prefix),
),
array_keys($this->messages),
));
}
protected function translate(?string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string
{
$domain ??= 'messages';
$catalogue = $this->getCatalogue($locale);
$format = $this instanceof TranslatorStrongTypeInterface
? $this->getFromCatalogue($catalogue, (string) $id, $domain)
: $this->getCatalogue($locale)->get((string) $id, $domain); // @codeCoverageIgnore
if ($format instanceof Closure) {
// @codeCoverageIgnoreStart
try {
$count = (new ReflectionFunction($format))->getNumberOfRequiredParameters();
} catch (ReflectionException) {
$count = 0;
}
// @codeCoverageIgnoreEnd
return $format(
...array_values($parameters),
...array_fill(0, max(0, $count - \count($parameters)), null)
);
}
return parent::trans($id, $parameters, $domain, $locale);
}
/**
* Init messages language from matching file in Lang directory.
*
* @param string $locale
*
* @return bool
*/
protected function loadMessagesFromFile(string $locale): bool
{
return isset($this->messages[$locale]) || $this->resetMessages($locale);
}
/**
* Set messages of a locale and take file first if present.
*
* @param string $locale
* @param array $messages
*
* @return $this
*/
public function setMessages(string $locale, array $messages): static
{
$this->loadMessagesFromFile($locale);
$this->addResource('array', $messages, $locale);
$this->messages[$locale] = array_merge(
$this->messages[$locale] ?? [],
$messages
);
return $this;
}
/**
* Set messages of the current locale and take file first if present.
*
* @param array $messages
*
* @return $this
*/
public function setTranslations(array $messages): static
{
return $this->setMessages($this->getLocale(), $messages);
}
/**
* Get messages of a locale, if none given, return all the
* languages.
*/
public function getMessages(?string $locale = null): array
{
return $locale === null ? $this->messages : $this->messages[$locale];
}
/**
* Set the current translator locale and indicate if the source locale file exists
*
* @param string $locale locale ex. en
*/
public function setLocale($locale): void
{
$locale = preg_replace_callback('/[-_]([a-z]{2,}|\d{2,})/', function ($matches) {
// _2-letters or YUE is a region, _3+-letters is a variant
$upper = strtoupper($matches[1]);
if ($upper === 'YUE' || $upper === 'ISO' || \strlen($upper) <= static::REGION_CODE_LENGTH) {
return "_$upper";
}
return '_'.ucfirst($matches[1]);
}, strtolower($locale));
$previousLocale = $this->getLocale();
if ($previousLocale === $locale && isset($this->messages[$locale])) {
return;
}
unset(static::$singletons[$previousLocale]);
if ($locale === 'auto') {
$completeLocale = setlocale(LC_TIME, '0');
$locale = preg_replace('/^([^_.-]+).*$/', '$1', $completeLocale);
$locales = $this->getAvailableLocales($locale);
$completeLocaleChunks = preg_split('/[_.-]+/', $completeLocale);
$getScore = static fn ($language) => self::compareChunkLists(
$completeLocaleChunks,
preg_split('/[_.-]+/', $language),
);
usort($locales, static fn ($first, $second) => $getScore($second) <=> $getScore($first));
$locale = $locales[0] ?? 'en';
}
if (isset($this->aliases[$locale])) {
$locale = $this->aliases[$locale];
}
// If the language is not provided by a Carbon file
// and the tag contains a region (ex: en_CA), then
// first load the macro (ex: en) to have a fallback
if (
str_contains($locale, '_')
&& !\in_array($locale, self::getInternallySupportedLocales(), true)
&& $this->loadMessagesFromFile($macroLocale = preg_replace('/^([^_]+).*$/', '$1', $locale))
) {
parent::setLocale($macroLocale);
}
if (!$this->loadMessagesFromFile($locale) && !$this->initializing) {
return;
}
parent::setLocale($locale);
}
/**
* Show locale on var_dump().
*
* @return array
*/
public function __debugInfo()
{
return [
'locale' => $this->getLocale(),
];
}
public function __serialize(): array
{
return [
'locale' => $this->getLocale(),
];
}
public function __unserialize(array $data): void
{
$this->initialize($data['locale'] ?? 'en');
}
private function initialize($locale, ?MessageFormatterInterface $formatter = null, $cacheDir = null, $debug = false): void
{
parent::setLocale($locale);
$this->initializing = true;
$this->directories = [self::getDefaultLangDirectory()];
$this->addLoader('array', new ArrayLoader());
parent::__construct($locale, new MessageFormatterMapper($formatter), $cacheDir, $debug);
$this->initializing = false;
}
private static function compareChunkLists($referenceChunks, $chunks)
{
$score = 0;
foreach ($referenceChunks as $index => $chunk) {
if (!isset($chunks[$index])) {
$score++;
continue;
}
if (strtolower($chunks[$index]) === strtolower($chunk)) {
$score += 10;
}
}
return $score;
}
/** @codeCoverageIgnore */
private function modifyResources(callable $callback): void
{
try {
$resourcesProperty = new ReflectionProperty(SymfonyTranslator::class, 'resources');
$resources = $resourcesProperty->getValue($this);
$resourcesProperty->setValue($this, $callback($resources));
} catch (Throwable) {
// Clear resources if available, if not, then nothing to clean
}
}
private static function getPhpFilesInDirectory(string $directory, string $prefix): array
{
if ($directory !== self::getDefaultLangDirectory()) {
return glob("$directory/$prefix*.php") ?: [];
}
// If it's the internal Carbon directory we use a static list
// which is faster than scanning the folder with glob()
$locales = self::getInternallySupportedLocales();
if ($prefix !== '') {
$locales = array_values(array_filter(
self::getInternallySupportedLocales(),
static fn (string $locale) => str_starts_with($locale, $prefix),
));
}
return array_map(
static fn (string $locale) => "$directory/$locale.php",
$locales,
);
}
private static function getDefaultLangDirectory(): string
{
return __DIR__.'/Lang';
}
/** @return list<string> */
private static function getInternallySupportedLocales(): array
{
return [
'aa',
'aa_DJ',
'aa_ER',
'aa_ER@saaho',
'aa_ET',
'af',
'af_NA',
'af_ZA',
'agq',
'agr',
'agr_PE',
'ak',
'ak_GH',
'am',
'am_ET',
'an',
'an_ES',
'anp',
'anp_IN',
'ar',
'ar_AE',
'ar_BH',
'ar_DJ',
'ar_DZ',
'ar_EG',
'ar_EH',
'ar_ER',
'ar_IL',
'ar_IN',
'ar_IQ',
'ar_JO',
'ar_KM',
'ar_KW',
'ar_LB',
'ar_LY',
'ar_MA',
'ar_MR',
'ar_OM',
'ar_PS',
'ar_QA',
'ar_SA',
'ar_SD',
'ar_SO',
'ar_SS',
'ar_SY',
'ar_Shakl',
'ar_TD',
'ar_TN',
'ar_YE',
'as',
'as_IN',
'asa',
'ast',
'ast_ES',
'ayc',
'ayc_PE',
'az',
'az_AZ',
'az_Arab',
'az_Cyrl',
'az_IR',
'az_Latn',
'bas',
'be',
'be_BY',
'be_BY@latin',
'bem',
'bem_ZM',
'ber',
'ber_DZ',
'ber_MA',
'bez',
'bg',
'bg_BG',
'bhb',
'bhb_IN',
'bho',
'bho_IN',
'bi',
'bi_VU',
'bm',
'bn',
'bn_BD',
'bn_IN',
'bo',
'bo_CN',
'bo_IN',
'br',
'br_FR',
'brx',
'brx_IN',
'bs',
'bs_BA',
'bs_Cyrl',
'bs_Latn',
'byn',
'byn_ER',
'ca',
'ca_AD',
'ca_ES',
'ca_ES_Valencia',
'ca_FR',
'ca_IT',
'ccp',
'ccp_IN',
'ce',
'ce_RU',
'cgg',
'chr',
'chr_US',
'ckb',
'cmn',
'cmn_TW',
'crh',
'crh_UA',
'cs',
'cs_CZ',
'csb',
'csb_PL',
'cu',
'cv',
'cv_RU',
'cy',
'cy_GB',
'da',
'da_DK',
'da_GL',
'dav',
'de',
'de_AT',
'de_BE',
'de_CH',
'de_DE',
'de_IT',
'de_LI',
'de_LU',
'dje',
'doi',
'doi_IN',
'dsb',
'dsb_DE',
'dua',
'dv',
'dv_MV',
'dyo',
'dz',
'dz_BT',
'ebu',
'ee',
'ee_TG',
'el',
'el_CY',
'el_GR',
'en',
'en_001',
'en_150',
'en_AG',
'en_AI',
'en_AS',
'en_AT',
'en_AU',
'en_BB',
'en_BE',
'en_BI',
'en_BM',
'en_BS',
'en_BW',
'en_BZ',
'en_CA',
'en_CC',
'en_CH',
'en_CK',
'en_CM',
'en_CX',
'en_CY',
'en_DE',
'en_DG',
'en_DK',
'en_DM',
'en_ER',
'en_FI',
'en_FJ',
'en_FK',
'en_FM',
'en_GB',
'en_GD',
'en_GG',
'en_GH',
'en_GI',
'en_GM',
'en_GU',
'en_GY',
'en_HK',
'en_IE',
'en_IL',
'en_IM',
'en_IN',
'en_IO',
'en_ISO',
'en_JE',
'en_JM',
'en_KE',
'en_KI',
'en_KN',
'en_KY',
'en_LC',
'en_LR',
'en_LS',
'en_MG',
'en_MH',
'en_MO',
'en_MP',
'en_MS',
'en_MT',
'en_MU',
'en_MW',
'en_MY',
'en_NA',
'en_NF',
'en_NG',
'en_NL',
'en_NR',
'en_NU',
'en_NZ',
'en_PG',
'en_PH',
'en_PK',
'en_PN',
'en_PR',
'en_PW',
'en_RW',
'en_SB',
'en_SC',
'en_SD',
'en_SE',
'en_SG',
'en_SH',
'en_SI',
'en_SL',
'en_SS',
'en_SX',
'en_SZ',
'en_TC',
'en_TK',
'en_TO',
'en_TT',
'en_TV',
'en_TZ',
'en_UG',
'en_UM',
'en_US',
'en_US_Posix',
'en_VC',
'en_VG',
'en_VI',
'en_VU',
'en_WS',
'en_ZA',
'en_ZM',
'en_ZW',
'eo',
'es',
'es_419',
'es_AR',
'es_BO',
'es_BR',
'es_BZ',
'es_CL',
'es_CO',
'es_CR',
'es_CU',
'es_DO',
'es_EA',
'es_EC',
'es_ES',
'es_GQ',
'es_GT',
'es_HN',
'es_IC',
'es_MX',
'es_NI',
'es_PA',
'es_PE',
'es_PH',
'es_PR',
'es_PY',
'es_SV',
'es_US',
'es_UY',
'es_VE',
'et',
'et_EE',
'eu',
'eu_ES',
'ewo',
'fa',
'fa_AF',
'fa_IR',
'ff',
'ff_CM',
'ff_GN',
'ff_MR',
'ff_SN',
'fi',
'fi_FI',
'fil',
'fil_PH',
'fo',
'fo_DK',
'fo_FO',
'fr',
'fr_BE',
'fr_BF',
'fr_BI',
'fr_BJ',
'fr_BL',
'fr_CA',
'fr_CD',
'fr_CF',
'fr_CG',
'fr_CH',
'fr_CI',
'fr_CM',
'fr_DJ',
'fr_DZ',
'fr_FR',
'fr_GA',
'fr_GF',
'fr_GN',
'fr_GP',
'fr_GQ',
'fr_HT',
'fr_KM',
'fr_LU',
'fr_MA',
'fr_MC',
'fr_MF',
'fr_MG',
'fr_ML',
'fr_MQ',
'fr_MR',
'fr_MU',
'fr_NC',
'fr_NE',
'fr_PF',
'fr_PM',
'fr_RE',
'fr_RW',
'fr_SC',
'fr_SN',
'fr_SY',
'fr_TD',
'fr_TG',
'fr_TN',
'fr_VU',
'fr_WF',
'fr_YT',
'fur',
'fur_IT',
'fy',
'fy_DE',
'fy_NL',
'ga',
'ga_IE',
'gd',
'gd_GB',
'gez',
'gez_ER',
'gez_ET',
'gl',
'gl_ES',
'gom',
'gom_Latn',
'gsw',
'gsw_CH',
'gsw_FR',
'gsw_LI',
'gu',
'gu_IN',
'guz',
'gv',
'gv_GB',
'ha',
'ha_GH',
'ha_NE',
'ha_NG',
'hak',
'hak_TW',
'haw',
'he',
'he_IL',
'hi',
'hi_IN',
'hif',
'hif_FJ',
'hne',
'hne_IN',
'hr',
'hr_BA',
'hr_HR',
'hsb',
'hsb_DE',
'ht',
'ht_HT',
'hu',
'hu_HU',
'hy',
'hy_AM',
'i18n',
'ia',
'ia_FR',
'id',
'id_ID',
'ig',
'ig_NG',
'ii',
'ik',
'ik_CA',
'in',
'is',
'is_IS',
'it',
'it_CH',
'it_IT',
'it_SM',
'it_VA',
'iu',
'iu_CA',
'iw',
'ja',
'ja_JP',
'jgo',
'jmc',
'jv',
'ka',
'ka_GE',
'kab',
'kab_DZ',
'kam',
'kde',
'kea',
'khq',
'ki',
'kk',
'kk_KZ',
'kkj',
'kl',
'kl_GL',
'kln',
'km',
'km_KH',
'kn',
'kn_IN',
'ko',
'ko_KP',
'ko_KR',
'kok',
'kok_IN',
'ks',
'ks_IN',
'ks_IN@devanagari',
'ksb',
'ksf',
'ksh',
'ku',
'ku_TR',
'kw',
'kw_GB',
'ky',
'ky_KG',
'lag',
'lb',
'lb_LU',
'lg',
'lg_UG',
'li',
'li_NL',
'lij',
'lij_IT',
'lkt',
'ln',
'ln_AO',
'ln_CD',
'ln_CF',
'ln_CG',
'lo',
'lo_LA',
'lrc',
'lrc_IQ',
'lt',
'lt_LT',
'lu',
'luo',
'luy',
'lv',
'lv_LV',
'lzh',
'lzh_TW',
'mag',
'mag_IN',
'mai',
'mai_IN',
'mas',
'mas_TZ',
'mer',
'mfe',
'mfe_MU',
'mg',
'mg_MG',
'mgh',
'mgo',
'mhr',
'mhr_RU',
'mi',
'mi_NZ',
'miq',
'miq_NI',
'mjw',
'mjw_IN',
'mk',
'mk_MK',
'ml',
'ml_IN',
'mn',
'mn_MN',
'mni',
'mni_IN',
'mo',
'mr',
'mr_IN',
'ms',
'ms_BN',
'ms_MY',
'ms_SG',
'mt',
'mt_MT',
'mua',
'my',
'my_MM',
'mzn',
'nan',
'nan_TW',
'nan_TW@latin',
'naq',
'nb',
'nb_NO',
'nb_SJ',
'nd',
'nds',
'nds_DE',
'nds_NL',
'ne',
'ne_IN',
'ne_NP',
'nhn',
'nhn_MX',
'niu',
'niu_NU',
'nl',
'nl_AW',
'nl_BE',
'nl_BQ',
'nl_CW',
'nl_NL',
'nl_SR',
'nl_SX',
'nmg',
'nn',
'nn_NO',
'nnh',
'no',
'nr',
'nr_ZA',
'nso',
'nso_ZA',
'nus',
'nyn',
'oc',
'oc_FR',
'om',
'om_ET',
'om_KE',
'or',
'or_IN',
'os',
'os_RU',
'pa',
'pa_Arab',
'pa_Guru',
'pa_IN',
'pa_PK',
'pap',
'pap_AW',
'pap_CW',
'pl',
'pl_PL',
'prg',
'ps',
'ps_AF',
'pt',
'pt_AO',
'pt_BR',
'pt_CH',
'pt_CV',
'pt_GQ',
'pt_GW',
'pt_LU',
'pt_MO',
'pt_MZ',
'pt_PT',
'pt_ST',
'pt_TL',
'qu',
'qu_BO',
'qu_EC',
'quz',
'quz_PE',
'raj',
'raj_IN',
'rm',
'rn',
'ro',
'ro_MD',
'ro_RO',
'rof',
'ru',
'ru_BY',
'ru_KG',
'ru_KZ',
'ru_MD',
'ru_RU',
'ru_UA',
'rw',
'rw_RW',
'rwk',
'sa',
'sa_IN',
'sah',
'sah_RU',
'saq',
'sat',
'sat_IN',
'sbp',
'sc',
'sc_IT',
'sd',
'sd_IN',
'sd_IN@devanagari',
'se',
'se_FI',
'se_NO',
'se_SE',
'seh',
'ses',
'sg',
'sgs',
'sgs_LT',
'sh',
'shi',
'shi_Latn',
'shi_Tfng',
'shn',
'shn_MM',
'shs',
'shs_CA',
'si',
'si_LK',
'sid',
'sid_ET',
'sk',
'sk_SK',
'sl',
'sl_SI',
'sm',
'sm_WS',
'smn',
'sn',
'so',
'so_DJ',
'so_ET',
'so_KE',
'so_SO',
'sq',
'sq_AL',
'sq_MK',
'sq_XK',
'sr',
'sr_Cyrl',
'sr_Cyrl_BA',
'sr_Cyrl_ME',
'sr_Cyrl_XK',
'sr_Latn',
'sr_Latn_BA',
'sr_Latn_ME',
'sr_Latn_XK',
'sr_ME',
'sr_RS',
'sr_RS@latin',
'ss',
'ss_ZA',
'st',
'st_ZA',
'sv',
'sv_AX',
'sv_FI',
'sv_SE',
'sw',
'sw_CD',
'sw_KE',
'sw_TZ',
'sw_UG',
'szl',
'szl_PL',
'ta',
'ta_IN',
'ta_LK',
'ta_MY',
'ta_SG',
'tcy',
'tcy_IN',
'te',
'te_IN',
'teo',
'teo_KE',
'tet',
'tg',
'tg_TJ',
'th',
'th_TH',
'the',
'the_NP',
'ti',
'ti_ER',
'ti_ET',
'tig',
'tig_ER',
'tk',
'tk_TM',
'tl',
'tl_PH',
'tlh',
'tn',
'tn_ZA',
'to',
'to_TO',
'tpi',
'tpi_PG',
'tr',
'tr_CY',
'tr_TR',
'ts',
'ts_ZA',
'tt',
'tt_RU',
'tt_RU@iqtelif',
'twq',
'tzl',
'tzm',
'tzm_Latn',
'ug',
'ug_CN',
'uk',
'uk_UA',
'unm',
'unm_US',
'ur',
'ur_IN',
'ur_PK',
'uz',
'uz_Arab',
'uz_Cyrl',
'uz_Latn',
'uz_UZ',
'uz_UZ@cyrillic',
'vai',
'vai_Latn',
'vai_Vaii',
've',
've_ZA',
'vi',
'vi_VN',
'vo',
'vun',
'wa',
'wa_BE',
'wae',
'wae_CH',
'wal',
'wal_ET',
'wo',
'wo_SN',
'xh',
'xh_ZA',
'xog',
'yav',
'yi',
'yi_US',
'yo',
'yo_BJ',
'yo_NG',
'yue',
'yue_HK',
'yue_Hans',
'yue_Hant',
'yuw',
'yuw_PG',
'zgh',
'zh',
'zh_CN',
'zh_HK',
'zh_Hans',
'zh_Hans_HK',
'zh_Hans_MO',
'zh_Hans_SG',
'zh_Hant',
'zh_Hant_HK',
'zh_Hant_MO',
'zh_Hant_TW',
'zh_MO',
'zh_SG',
'zh_TW',
'zh_YUE',
'zu',
'zu_ZA',
];
}
}
================================================
FILE: src/Carbon/Callback.php
================================================
<?php
declare(strict_types=1);
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon;
use Closure;
use DateInterval;
use DatePeriod;
use DateTime;
use DateTimeInterface;
use DateTimeZone;
use ReflectionFunction;
use ReflectionNamedType;
use ReflectionType;
final class Callback
{
private ?ReflectionFunction $function;
private function __construct(private readonly Closure $closure)
{
}
public static function fromClosure(Closure $closure): self
{
return new self($closure);
}
public static function parameter(mixed $closure, mixed $value, string|int $index = 0): mixed
{
if ($closure instanceof Closure) {
return self::fromClosure($closure)->prepareParameter($value, $index);
}
return $value;
}
public function getReflectionFunction(): ReflectionFunction
{
return $this->function ??= new ReflectionFunction($this->closure);
}
public function prepareParameter(mixed $value, string|int $index = 0): mixed
{
$type = $this->getParameterType($index);
if (!($type instanceof ReflectionNamedType)) {
return $value;
}
$name = $type->getName();
if ($name === CarbonInterface::class) {
$name = $value instanceof DateTime ? Carbon::class : CarbonImmutable::class;
}
if (!class_exists($name) || is_a($value, $name)) {
return $value;
}
$class = $this->getPromotedClass($value);
if ($class && is_a($name, $class, true)) {
return $name::instance($value);
}
return $value;
}
public function call(mixed ...$arguments): mixed
{
foreach ($arguments as $index => &$value) {
if ($this->getPromotedClass($value)) {
$value = $this->prepareParameter($value, $index);
}
}
return ($this->closure)(...$arguments);
}
private function getParameterType(string|int $index): ?ReflectionType
{
$parameters = $this->getReflectionFunction()->getParameters();
if (\is_int($index)) {
return ($parameters[$index] ?? null)?->getType();
}
foreach ($parameters as $parameter) {
if ($parameter->getName() === $index) {
return $parameter->getType();
}
}
return null;
}
/** @return class-string|null */
private function getPromotedClass(mixed $value): ?string
{
if ($value instanceof DateTimeInterface) {
return CarbonInterface::class;
}
if ($value instanceof DateInterval) {
return CarbonInterval::class;
}
if ($value instanceof DatePeriod) {
return CarbonPeriod::class;
}
if ($value instanceof DateTimeZone) {
return CarbonTimeZone::class;
}
return null;
}
}
================================================
FILE: src/Carbon/Carbon.php
================================================
<?php
declare(strict_types=1);
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon;
use Carbon\Traits\Date;
use DateTime;
use DateTimeInterface;
/**
* A simple API extension for DateTime.
*
* <autodoc generated by `composer phpdoc`>
*
* @property string $localeDayOfWeek the day of week in current locale
* @property string $shortLocaleDayOfWeek the abbreviated day of week in current locale
* @property string $localeMonth the month in current locale
* @property string $shortLocaleMonth the abbreviated month in current locale
* @property int $year
* @property int $yearIso
* @property int $month
* @property int $day
* @property int $hour
* @property int $minute
* @property int $second
* @property int $micro
* @property int $microsecond
* @property int $dayOfWeekIso 1 (for Monday) through 7 (for Sunday)
* @property int|float|string $timestamp seconds since the Unix Epoch
* @property string $englishDayOfWeek the day of week in English
* @property string $shortEnglishDayOfWeek the abbreviated day of week in English
* @property string $englishMonth the month in English
* @property string $shortEnglishMonth the abbreviated month in English
* @property int $milliseconds
* @property int $millisecond
* @property int $milli
* @property int $week 1 through 53
* @property int $isoWeek 1 through 53
* @property int $weekYear year according to week format
* @property int $isoWeekYear year according to ISO week format
* @property int $age does a diffInYears() with default parameters
* @property int $offset the timezone offset in seconds from UTC
* @property int $offsetMinutes the timezone offset in minutes from UTC
* @property int $offsetHours the timezone offset in hours from UTC
* @property CarbonTimeZone $timezone the current timezone
* @property CarbonTimeZone $tz alias of $timezone
* @property int $centuryOfMillennium The value of the century starting from the beginning of the current millennium
* @property int $dayOfCentury The value of the day starting from the beginning of the current century
* @property int $dayOfDecade The value of the day starting from the beginning of the current decade
* @property int $dayOfMillennium The value of the day starting from the beginning of the current millennium
* @property int $dayOfMonth The value of the day starting from the beginning of the current month
* @property int $dayOfQuarter The value of the day starting from the beginning of the current quarter
* @property int $dayOfWeek 0 (for Sunday) through 6 (for Saturday)
* @property int $dayOfYear 1 through 366
* @property int $decadeOfCentury The value of the decade starting from the beginning of the current century
* @property int $decadeOfMillennium The value of the decade starting from the beginning of the current millennium
* @property int $hourOfCentury The value of the hour starting from the beginning of the current century
* @property int $hourOfDay The value of the hour starting from the beginning of the current day
* @property int $hourOfDecade The value of the hour starting from the beginning of the current decade
* @property int $hourOfMillennium The value of the hour starting from the beginning of the current millennium
* @property int $hourOfMonth The value of the hour starting from the beginning of the current month
* @property int $hourOfQuarter The value of the hour starting from the beginning of the current quarter
* @property int $hourOfWeek The value of the hour starting from the beginning of the current week
* @property int $hourOfYear The value of the hour starting from the beginning of the current year
* @property int $microsecondOfCentury The value of the microsecond starting from the beginning of the current century
* @property int $microsecondOfDay The value of the microsecond starting from the beginning of the current day
* @property int $microsecondOfDecade The value of the microsecond starting from the beginning of the current decade
* @property int $microsecondOfHour The value of the microsecond starting from the beginning of the current hour
* @property int $microsecondOfMillennium The value of the microsecond starting from the beginning of the current millennium
* @property int $microsecondOfMillisecond The value of the microsecond starting from the beginning of the current millisecond
* @property int $microsecondOfMinute The value of the microsecond starting from the beginning of the current minute
* @property int $microsecondOfMonth The value of the microsecond starting from the beginning of the current month
* @property int $microsecondOfQuarter The value of the microsecond starting from the beginning of the current quarter
* @property int $microsecondOfSecond The value of the microsecond starting from the beginning of the current second
* @property int $microsecondOfWeek The value of the microsecond starting from the beginning of the current week
* @property int $microsecondOfYear The value of the microsecond starting from the beginning of the current year
* @property int $millisecondOfCentury The value of the millisecond starting from the beginning of the current century
* @property int $millisecondOfDay The value of the millisecond starting from the beginning of the current day
* @property int $millisecondOfDecade The value of the millisecond starting from the beginning of the current decade
* @property int $millisecondOfHour The value of the millisecond starting from the beginning of the current hour
* @property int $millisecondOfMillennium The value of the millisecond starting from the beginning of the current millennium
* @property int $millisecondOfMinute The value of the millisecond starting from the beginning of the current minute
* @property int $millisecondOfMonth The value of the millisecond starting from the beginning of the current month
* @property int $millisecondOfQuarter The value of the millisecond starting from the beginning of the current quarter
* @property int $millisecondOfSecond The value of the millisecond starting from the beginning of the current second
* @property int $millisecondOfWeek The value of the millisecond starting from the beginning of the current week
* @property int $millisecondOfYear The value of the millisecond starting from the beginning of the current year
* @property int $minuteOfCentury The value of the minute starting from the beginning of the current century
* @property int $minuteOfDay The value of the minute starting from the beginning of the current day
* @property int $minuteOfDecade The value of the minute starting from the beginning of the current decade
* @property int $minuteOfHour The value of the minute starting from the beginning of the current hour
* @property int $minuteOfMillennium The value of the minute starting from the beginning of the current millennium
* @property int $minuteOfMonth The value of the minute starting from the beginning of the current month
* @property int $minuteOfQuarter The value of the minute starting from the beginning of the current quarter
* @property int $minuteOfWeek The value of the minute starting from the beginning of the current week
* @property int $minuteOfYear The value of the minute starting from the beginning of the current year
* @property int $monthOfCentury The value of the month starting from the beginning of the current century
* @property int $monthOfDecade The value of the month starting from the beginning of the current decade
* @property int $monthOfMillennium The value of the month starting from the beginning of the current millennium
* @property int $monthOfQuarter The value of the month starting from the beginning of the current quarter
* @property int $monthOfYear The value of the month starting from the beginning of the current year
* @property int $quarterOfCentury The value of the quarter starting from the beginning of the current century
* @property int $quarterOfDecade The value of the quarter starting from the beginning of the current decade
* @property int $quarterOfMillennium The value of the quarter starting from the beginning of the current millennium
* @property int $quarterOfYear The value of the quarter starting from the beginning of the current year
* @property int $secondOfCentury The value of the second starting from the beginning of the current century
* @property int $secondOfDay The value of the second starting from the beginning of the current day
* @property int $secondOfDecade The value of the second starting from the beginning of the current decade
* @property int $secondOfHour The value of the second starting from the beginning of the current hour
* @property int $secondOfMillennium The value of the second starting from the beginning of the current millennium
* @property int $secondOfMinute The value of the second starting from the beginning of the current minute
* @property int $secondOfMonth The value of the second starting from the beginning of the current month
* @property int $secondOfQuarter The value of the second starting from the beginning of the current quarter
* @property int $secondOfWeek The value of the second starting from the beginning of the current week
* @property int $secondOfYear The value of the second starting from the beginning of the current year
* @property int $weekOfCentury The value of the week starting from the beginning of the current century
* @property int $weekOfDecade The value of the week starting from the beginning of the current decade
* @property int $weekOfMillennium The value of the week starting from the beginning of the current millennium
* @property int $weekOfMonth 1 through 5
* @property int $weekOfQuarter The value of the week starting from the beginning of the current quarter
* @property int $weekOfYear ISO-8601 week number of year, weeks starting on Monday
* @property int $yearOfCentury The value of the year starting from the beginning of the current century
* @property int $yearOfDecade The value of the year starting from the beginning of the current decade
* @property int $yearOfMillennium The value of the year starting from the beginning of the current millennium
* @property-read string $latinMeridiem "am"/"pm" (Ante meridiem or Post meridiem latin lowercase mark)
* @property-read string $latinUpperMeridiem "AM"/"PM" (Ante meridiem or Post meridiem latin uppercase mark)
* @property-read string $timezoneAbbreviatedName the current timezone abbreviated name
* @property-read string $tzAbbrName alias of $timezoneAbbreviatedName
* @property-read string $dayName long name of weekday translated according to Carbon locale, in english if no translation available for current language
* @property-read string $shortDayName short name of weekday translated according to Carbon locale, in english if no translation available for current language
* @property-read string $minDayName very short name of weekday translated according to Carbon locale, in english if no translation available for current language
* @property-read string $monthName long name of month translated according to Carbon locale, in english if no translation available for current language
* @property-read string $shortMonthName short name of month translated according to Carbon locale, in english if no translation available for current language
* @property-read string $meridiem lowercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language
* @property-read string $upperMeridiem uppercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language
* @property-read int $noZeroHour current hour from 1 to 24
* @property-read int $isoWeeksInYear 51 through 53
* @property-read int $weekNumberInMonth 1 through 5
* @property-read int $firstWeekDay 0 through 6
* @property-read int $lastWeekDay 0 through 6
* @property-read int $quarter the quarter of this instance, 1 - 4
* @property-read int $decade the decade of this instance
* @property-read int $century the century of this instance
* @property-read int $millennium the millennium of this instance
* @property-read bool $dst daylight savings time indicator, true if DST, false otherwise
* @property-read bool $local checks if the timezone is local, true if local, false otherwise
* @property-read bool $utc checks if the timezone is UTC, true if UTC, false otherwise
* @property-read string $timezoneName the current timezone name
* @property-read string $tzName alias of $timezoneName
* @property-read string $locale locale of the current instance
* @property-read int $centuriesInMillennium The number of centuries contained in the current millennium
* @property-read int $daysInCentury The number of days contained in the current century
* @property-read int $daysInDecade The number of days contained in the current decade
* @property-read int $daysInMillennium The number of days contained in the current millennium
* @property-read int $daysInMonth number of days in the given month
* @property-read int $daysInQuarter The number of days contained in the current quarter
* @property-read int $daysInWeek The number of days contained in the current week
* @property-read int $daysInYear 365 or 366
* @property-read int $decadesInCentury The number of decades contained in the current century
* @property-read int $decadesInMillennium The number of decades contained in the current millennium
* @property-read int $hoursInCentury The number of hours contained in the current century
* @property-read int $hoursInDay The number of hours contained in the current day
* @property-read int $hoursInDecade The number of hours contained in the current decade
* @property-read int $hoursInMillennium The number of hours contained in the current millennium
* @property-read int $hoursInMonth The number of hours contained in the current month
* @property-read int $hoursInQuarter The number of hours contained in the current quarter
* @property-read int $hoursInWeek The number of hours contained in the current week
* @property-read int $hoursInYear The number of hours contained in the current year
* @property-read int $microsecondsInCentury The number of microseconds contained in the current century
* @property-read int $microsecondsInDay The number of microseconds contained in the current day
* @property-read int $microsecondsInDecade The number of microseconds contained in the current decade
* @property-read int $microsecondsInHour The number of microseconds contained in the current hour
* @property-read int $microsecondsInMillennium The number of microseconds contained in the current millennium
* @property-read int $microsecondsInMillisecond The number of microseconds contained in the current millisecond
* @property-read int $microsecondsInMinute The number of microseconds contained in the current minute
* @property-read int $microsecondsInMonth The number of microseconds contained in the current month
* @property-read int $microsecondsInQuarter The number of microseconds contained in the current quarter
* @property-read int $microsecondsInSecond The number of microseconds contained in the current second
* @property-read int $microsecondsInWeek The number of microseconds contained in the current week
* @property-read int $microsecondsInYear The number of microseconds contained in the current year
* @property-read int $millisecondsInCentury The number of milliseconds contained in the current century
* @property-read int $millisecondsInDay The number of milliseconds contained in the current day
* @property-read int $millisecondsInDecade The number of milliseconds contained in the current decade
* @property-read int $millisecondsInHour The number of milliseconds contained in the current hour
* @property-read int $millisecondsInMillennium The number of milliseconds contained in the current millennium
* @property-read int $millisecondsInMinute The number of milliseconds contained in the current minute
* @property-read int $millisecondsInMonth The number of milliseconds contained in the current month
* @property-read int $millisecondsInQuarter The number of milliseconds contained in the current quarter
* @property-read int $millisecondsInSecond The number of milliseconds contained in the current second
* @property-read int $millisecondsInWeek The number of milliseconds contained in the current week
* @property-read int $millisecondsInYear The number of milliseconds contained in the current year
* @property-read int $minutesInCentury The number of minutes contained in the current century
* @property-read int $minutesInDay
gitextract_wjayfrdi/
├── .editorconfig
├── .gitattributes
├── .github/
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE/
│ │ └── bug_report.md
│ ├── ISSUE_TEMPLATE.md
│ ├── dependabot.yml
│ └── workflows/
│ ├── deploy-documentation.yml
│ ├── documentation.yml
│ ├── laravel.yml
│ ├── phpcs.yml
│ ├── phpmd.yml
│ ├── phpstan.yml
│ ├── sponsors.yml
│ └── tests.yml
├── .gitignore
├── .php-cs-fixer.dist.php
├── .phpstorm.meta.php
├── .styleci.yml
├── LICENSE
├── bin/
│ ├── carbon
│ └── carbon.bat
├── build.php
├── codecov.yml
├── composer.json
├── contributing.md
├── extension.neon
├── lazy/
│ └── Carbon/
│ ├── MessageFormatter/
│ │ ├── MessageFormatterMapperStrongType.php
│ │ └── MessageFormatterMapperWeakType.php
│ ├── ProtectedDatePeriod.php
│ ├── TranslatorStrongType.php
│ ├── TranslatorWeakType.php
│ └── UnprotectedDatePeriod.php
├── phpdoc.php
├── phpmd.xml
├── phpstan.neon
├── phpunit.xml.dist
├── psalm.xml
├── readme.md
├── sponsors.php
├── src/
│ └── Carbon/
│ ├── AbstractTranslator.php
│ ├── Callback.php
│ ├── Carbon.php
│ ├── CarbonConverterInterface.php
│ ├── CarbonImmutable.php
│ ├── CarbonInterface.php
│ ├── CarbonInterval.php
│ ├── CarbonPeriod.php
│ ├── CarbonPeriodImmutable.php
│ ├── CarbonTimeZone.php
│ ├── Cli/
│ │ └── Invoker.php
│ ├── Constants/
│ │ ├── DiffOptions.php
│ │ ├── Format.php
│ │ ├── TranslationOptions.php
│ │ └── UnitValue.php
│ ├── Exceptions/
│ │ ├── BadComparisonUnitException.php
│ │ ├── BadFluentConstructorException.php
│ │ ├── BadFluentSetterException.php
│ │ ├── BadMethodCallException.php
│ │ ├── EndLessPeriodException.php
│ │ ├── Exception.php
│ │ ├── ImmutableException.php
│ │ ├── InvalidArgumentException.php
│ │ ├── InvalidCastException.php
│ │ ├── InvalidDateException.php
│ │ ├── InvalidFormatException.php
│ │ ├── InvalidIntervalException.php
│ │ ├── InvalidPeriodDateException.php
│ │ ├── InvalidPeriodParameterException.php
│ │ ├── InvalidTimeZoneException.php
│ │ ├── InvalidTypeException.php
│ │ ├── NotACarbonClassException.php
│ │ ├── NotAPeriodException.php
│ │ ├── NotLocaleAwareException.php
│ │ ├── OutOfRangeException.php
│ │ ├── ParseErrorException.php
│ │ ├── RuntimeException.php
│ │ ├── UnitException.php
│ │ ├── UnitNotConfiguredException.php
│ │ ├── UnknownGetterException.php
│ │ ├── UnknownMethodException.php
│ │ ├── UnknownSetterException.php
│ │ ├── UnknownUnitException.php
│ │ ├── UnreachableException.php
│ │ └── UnsupportedUnitException.php
│ ├── Factory.php
│ ├── FactoryImmutable.php
│ ├── Lang/
│ │ ├── aa.php
│ │ ├── aa_DJ.php
│ │ ├── aa_ER.php
│ │ ├── aa_ER@saaho.php
│ │ ├── aa_ET.php
│ │ ├── af.php
│ │ ├── af_NA.php
│ │ ├── af_ZA.php
│ │ ├── agq.php
│ │ ├── agr.php
│ │ ├── agr_PE.php
│ │ ├── ak.php
│ │ ├── ak_GH.php
│ │ ├── am.php
│ │ ├── am_ET.php
│ │ ├── an.php
│ │ ├── an_ES.php
│ │ ├── anp.php
│ │ ├── anp_IN.php
│ │ ├── ar.php
│ │ ├── ar_AE.php
│ │ ├── ar_BH.php
│ │ ├── ar_DJ.php
│ │ ├── ar_DZ.php
│ │ ├── ar_EG.php
│ │ ├── ar_EH.php
│ │ ├── ar_ER.php
│ │ ├── ar_IL.php
│ │ ├── ar_IN.php
│ │ ├── ar_IQ.php
│ │ ├── ar_JO.php
│ │ ├── ar_KM.php
│ │ ├── ar_KW.php
│ │ ├── ar_LB.php
│ │ ├── ar_LY.php
│ │ ├── ar_MA.php
│ │ ├── ar_MR.php
│ │ ├── ar_OM.php
│ │ ├── ar_PS.php
│ │ ├── ar_QA.php
│ │ ├── ar_SA.php
│ │ ├── ar_SD.php
│ │ ├── ar_SO.php
│ │ ├── ar_SS.php
│ │ ├── ar_SY.php
│ │ ├── ar_Shakl.php
│ │ ├── ar_TD.php
│ │ ├── ar_TN.php
│ │ ├── ar_YE.php
│ │ ├── as.php
│ │ ├── as_IN.php
│ │ ├── asa.php
│ │ ├── ast.php
│ │ ├── ast_ES.php
│ │ ├── ayc.php
│ │ ├── ayc_PE.php
│ │ ├── az.php
│ │ ├── az_AZ.php
│ │ ├── az_Arab.php
│ │ ├── az_Cyrl.php
│ │ ├── az_IR.php
│ │ ├── az_Latn.php
│ │ ├── bas.php
│ │ ├── be.php
│ │ ├── be_BY.php
│ │ ├── be_BY@latin.php
│ │ ├── bem.php
│ │ ├── bem_ZM.php
│ │ ├── ber.php
│ │ ├── ber_DZ.php
│ │ ├── ber_MA.php
│ │ ├── bez.php
│ │ ├── bg.php
│ │ ├── bg_BG.php
│ │ ├── bhb.php
│ │ ├── bhb_IN.php
│ │ ├── bho.php
│ │ ├── bho_IN.php
│ │ ├── bi.php
│ │ ├── bi_VU.php
│ │ ├── bm.php
│ │ ├── bn.php
│ │ ├── bn_BD.php
│ │ ├── bn_IN.php
│ │ ├── bo.php
│ │ ├── bo_CN.php
│ │ ├── bo_IN.php
│ │ ├── br.php
│ │ ├── br_FR.php
│ │ ├── brx.php
│ │ ├── brx_IN.php
│ │ ├── bs.php
│ │ ├── bs_BA.php
│ │ ├── bs_Cyrl.php
│ │ ├── bs_Latn.php
│ │ ├── byn.php
│ │ ├── byn_ER.php
│ │ ├── ca.php
│ │ ├── ca_AD.php
│ │ ├── ca_ES.php
│ │ ├── ca_ES_Valencia.php
│ │ ├── ca_FR.php
│ │ ├── ca_IT.php
│ │ ├── ccp.php
│ │ ├── ccp_IN.php
│ │ ├── ce.php
│ │ ├── ce_RU.php
│ │ ├── cgg.php
│ │ ├── chr.php
│ │ ├── chr_US.php
│ │ ├── ckb.php
│ │ ├── cmn.php
│ │ ├── cmn_TW.php
│ │ ├── crh.php
│ │ ├── crh_UA.php
│ │ ├── cs.php
│ │ ├── cs_CZ.php
│ │ ├── csb.php
│ │ ├── csb_PL.php
│ │ ├── cu.php
│ │ ├── cv.php
│ │ ├── cv_RU.php
│ │ ├── cy.php
│ │ ├── cy_GB.php
│ │ ├── da.php
│ │ ├── da_DK.php
│ │ ├── da_GL.php
│ │ ├── dav.php
│ │ ├── de.php
│ │ ├── de_AT.php
│ │ ├── de_BE.php
│ │ ├── de_CH.php
│ │ ├── de_DE.php
│ │ ├── de_IT.php
│ │ ├── de_LI.php
│ │ ├── de_LU.php
│ │ ├── dje.php
│ │ ├── doi.php
│ │ ├── doi_IN.php
│ │ ├── dsb.php
│ │ ├── dsb_DE.php
│ │ ├── dua.php
│ │ ├── dv.php
│ │ ├── dv_MV.php
│ │ ├── dyo.php
│ │ ├── dz.php
│ │ ├── dz_BT.php
│ │ ├── ebu.php
│ │ ├── ee.php
│ │ ├── ee_TG.php
│ │ ├── el.php
│ │ ├── el_CY.php
│ │ ├── el_GR.php
│ │ ├── en.php
│ │ ├── en_001.php
│ │ ├── en_150.php
│ │ ├── en_AG.php
│ │ ├── en_AI.php
│ │ ├── en_AS.php
│ │ ├── en_AT.php
│ │ ├── en_AU.php
│ │ ├── en_BB.php
│ │ ├── en_BE.php
│ │ ├── en_BI.php
│ │ ├── en_BM.php
│ │ ├── en_BS.php
│ │ ├── en_BW.php
│ │ ├── en_BZ.php
│ │ ├── en_CA.php
│ │ ├── en_CC.php
│ │ ├── en_CH.php
│ │ ├── en_CK.php
│ │ ├── en_CM.php
│ │ ├── en_CX.php
│ │ ├── en_CY.php
│ │ ├── en_DE.php
│ │ ├── en_DG.php
│ │ ├── en_DK.php
│ │ ├── en_DM.php
│ │ ├── en_ER.php
│ │ ├── en_FI.php
│ │ ├── en_FJ.php
│ │ ├── en_FK.php
│ │ ├── en_FM.php
│ │ ├── en_GB.php
│ │ ├── en_GD.php
│ │ ├── en_GG.php
│ │ ├── en_GH.php
│ │ ├── en_GI.php
│ │ ├── en_GM.php
│ │ ├── en_GU.php
│ │ ├── en_GY.php
│ │ ├── en_HK.php
│ │ ├── en_IE.php
│ │ ├── en_IL.php
│ │ ├── en_IM.php
│ │ ├── en_IN.php
│ │ ├── en_IO.php
│ │ ├── en_ISO.php
│ │ ├── en_JE.php
│ │ ├── en_JM.php
│ │ ├── en_KE.php
│ │ ├── en_KI.php
│ │ ├── en_KN.php
│ │ ├── en_KY.php
│ │ ├── en_LC.php
│ │ ├── en_LR.php
│ │ ├── en_LS.php
│ │ ├── en_MG.php
│ │ ├── en_MH.php
│ │ ├── en_MO.php
│ │ ├── en_MP.php
│ │ ├── en_MS.php
│ │ ├── en_MT.php
│ │ ├── en_MU.php
│ │ ├── en_MW.php
│ │ ├── en_MY.php
│ │ ├── en_NA.php
│ │ ├── en_NF.php
│ │ ├── en_NG.php
│ │ ├── en_NL.php
│ │ ├── en_NR.php
│ │ ├── en_NU.php
│ │ ├── en_NZ.php
│ │ ├── en_PG.php
│ │ ├── en_PH.php
│ │ ├── en_PK.php
│ │ ├── en_PN.php
│ │ ├── en_PR.php
│ │ ├── en_PW.php
│ │ ├── en_RW.php
│ │ ├── en_SB.php
│ │ ├── en_SC.php
│ │ ├── en_SD.php
│ │ ├── en_SE.php
│ │ ├── en_SG.php
│ │ ├── en_SH.php
│ │ ├── en_SI.php
│ │ ├── en_SL.php
│ │ ├── en_SS.php
│ │ ├── en_SX.php
│ │ ├── en_SZ.php
│ │ ├── en_TC.php
│ │ ├── en_TK.php
│ │ ├── en_TO.php
│ │ ├── en_TT.php
│ │ ├── en_TV.php
│ │ ├── en_TZ.php
│ │ ├── en_UG.php
│ │ ├── en_UM.php
│ │ ├── en_US.php
│ │ ├── en_US_Posix.php
│ │ ├── en_VC.php
│ │ ├── en_VG.php
│ │ ├── en_VI.php
│ │ ├── en_VU.php
│ │ ├── en_WS.php
│ │ ├── en_ZA.php
│ │ ├── en_ZM.php
│ │ ├── en_ZW.php
│ │ ├── eo.php
│ │ ├── es.php
│ │ ├── es_419.php
│ │ ├── es_AR.php
│ │ ├── es_BO.php
│ │ ├── es_BR.php
│ │ ├── es_BZ.php
│ │ ├── es_CL.php
│ │ ├── es_CO.php
│ │ ├── es_CR.php
│ │ ├── es_CU.php
│ │ ├── es_DO.php
│ │ ├── es_EA.php
│ │ ├── es_EC.php
│ │ ├── es_ES.php
│ │ ├── es_GQ.php
│ │ ├── es_GT.php
│ │ ├── es_HN.php
│ │ ├── es_IC.php
│ │ ├── es_MX.php
│ │ ├── es_NI.php
│ │ ├── es_PA.php
│ │ ├── es_PE.php
│ │ ├── es_PH.php
│ │ ├── es_PR.php
│ │ ├── es_PY.php
│ │ ├── es_SV.php
│ │ ├── es_US.php
│ │ ├── es_UY.php
│ │ ├── es_VE.php
│ │ ├── et.php
│ │ ├── et_EE.php
│ │ ├── eu.php
│ │ ├── eu_ES.php
│ │ ├── ewo.php
│ │ ├── fa.php
│ │ ├── fa_AF.php
│ │ ├── fa_IR.php
│ │ ├── ff.php
│ │ ├── ff_CM.php
│ │ ├── ff_GN.php
│ │ ├── ff_MR.php
│ │ ├── ff_SN.php
│ │ ├── fi.php
│ │ ├── fi_FI.php
│ │ ├── fil.php
│ │ ├── fil_PH.php
│ │ ├── fo.php
│ │ ├── fo_DK.php
│ │ ├── fo_FO.php
│ │ ├── fr.php
│ │ ├── fr_BE.php
│ │ ├── fr_BF.php
│ │ ├── fr_BI.php
│ │ ├── fr_BJ.php
│ │ ├── fr_BL.php
│ │ ├── fr_CA.php
│ │ ├── fr_CD.php
│ │ ├── fr_CF.php
│ │ ├── fr_CG.php
│ │ ├── fr_CH.php
│ │ ├── fr_CI.php
│ │ ├── fr_CM.php
│ │ ├── fr_DJ.php
│ │ ├── fr_DZ.php
│ │ ├── fr_FR.php
│ │ ├── fr_GA.php
│ │ ├── fr_GF.php
│ │ ├── fr_GN.php
│ │ ├── fr_GP.php
│ │ ├── fr_GQ.php
│ │ ├── fr_HT.php
│ │ ├── fr_KM.php
│ │ ├── fr_LU.php
│ │ ├── fr_MA.php
│ │ ├── fr_MC.php
│ │ ├── fr_MF.php
│ │ ├── fr_MG.php
│ │ ├── fr_ML.php
│ │ ├── fr_MQ.php
│ │ ├── fr_MR.php
│ │ ├── fr_MU.php
│ │ ├── fr_NC.php
│ │ ├── fr_NE.php
│ │ ├── fr_PF.php
│ │ ├── fr_PM.php
│ │ ├── fr_RE.php
│ │ ├── fr_RW.php
│ │ ├── fr_SC.php
│ │ ├── fr_SN.php
│ │ ├── fr_SY.php
│ │ ├── fr_TD.php
│ │ ├── fr_TG.php
│ │ ├── fr_TN.php
│ │ ├── fr_VU.php
│ │ ├── fr_WF.php
│ │ ├── fr_YT.php
│ │ ├── fur.php
│ │ ├── fur_IT.php
│ │ ├── fy.php
│ │ ├── fy_DE.php
│ │ ├── fy_NL.php
│ │ ├── ga.php
│ │ ├── ga_IE.php
│ │ ├── gd.php
│ │ ├── gd_GB.php
│ │ ├── gez.php
│ │ ├── gez_ER.php
│ │ ├── gez_ET.php
│ │ ├── gl.php
│ │ ├── gl_ES.php
│ │ ├── gom.php
│ │ ├── gom_Latn.php
│ │ ├── gsw.php
│ │ ├── gsw_CH.php
│ │ ├── gsw_FR.php
│ │ ├── gsw_LI.php
│ │ ├── gu.php
│ │ ├── gu_IN.php
│ │ ├── guz.php
│ │ ├── gv.php
│ │ ├── gv_GB.php
│ │ ├── ha.php
│ │ ├── ha_GH.php
│ │ ├── ha_NE.php
│ │ ├── ha_NG.php
│ │ ├── hak.php
│ │ ├── hak_TW.php
│ │ ├── haw.php
│ │ ├── he.php
│ │ ├── he_IL.php
│ │ ├── hi.php
│ │ ├── hi_IN.php
│ │ ├── hif.php
│ │ ├── hif_FJ.php
│ │ ├── hne.php
│ │ ├── hne_IN.php
│ │ ├── hr.php
│ │ ├── hr_BA.php
│ │ ├── hr_HR.php
│ │ ├── hsb.php
│ │ ├── hsb_DE.php
│ │ ├── ht.php
│ │ ├── ht_HT.php
│ │ ├── hu.php
│ │ ├── hu_HU.php
│ │ ├── hy.php
│ │ ├── hy_AM.php
│ │ ├── i18n.php
│ │ ├── ia.php
│ │ ├── ia_FR.php
│ │ ├── id.php
│ │ ├── id_ID.php
│ │ ├── ig.php
│ │ ├── ig_NG.php
│ │ ├── ii.php
│ │ ├── ik.php
│ │ ├── ik_CA.php
│ │ ├── in.php
│ │ ├── is.php
│ │ ├── is_IS.php
│ │ ├── it.php
│ │ ├── it_CH.php
│ │ ├── it_IT.php
│ │ ├── it_SM.php
│ │ ├── it_VA.php
│ │ ├── iu.php
│ │ ├── iu_CA.php
│ │ ├── iw.php
│ │ ├── ja.php
│ │ ├── ja_JP.php
│ │ ├── jgo.php
│ │ ├── jmc.php
│ │ ├── jv.php
│ │ ├── ka.php
│ │ ├── ka_GE.php
│ │ ├── kab.php
│ │ ├── kab_DZ.php
│ │ ├── kam.php
│ │ ├── kde.php
│ │ ├── kea.php
│ │ ├── khq.php
│ │ ├── ki.php
│ │ ├── kk.php
│ │ ├── kk_KZ.php
│ │ ├── kkj.php
│ │ ├── kl.php
│ │ ├── kl_GL.php
│ │ ├── kln.php
│ │ ├── km.php
│ │ ├── km_KH.php
│ │ ├── kn.php
│ │ ├── kn_IN.php
│ │ ├── ko.php
│ │ ├── ko_KP.php
│ │ ├── ko_KR.php
│ │ ├── kok.php
│ │ ├── kok_IN.php
│ │ ├── ks.php
│ │ ├── ks_IN.php
│ │ ├── ks_IN@devanagari.php
│ │ ├── ksb.php
│ │ ├── ksf.php
│ │ ├── ksh.php
│ │ ├── ku.php
│ │ ├── ku_TR.php
│ │ ├── kw.php
│ │ ├── kw_GB.php
│ │ ├── ky.php
│ │ ├── ky_KG.php
│ │ ├── lag.php
│ │ ├── lb.php
│ │ ├── lb_LU.php
│ │ ├── lg.php
│ │ ├── lg_UG.php
│ │ ├── li.php
│ │ ├── li_NL.php
│ │ ├── lij.php
│ │ ├── lij_IT.php
│ │ ├── lkt.php
│ │ ├── ln.php
│ │ ├── ln_AO.php
│ │ ├── ln_CD.php
│ │ ├── ln_CF.php
│ │ ├── ln_CG.php
│ │ ├── lo.php
│ │ ├── lo_LA.php
│ │ ├── lrc.php
│ │ ├── lrc_IQ.php
│ │ ├── lt.php
│ │ ├── lt_LT.php
│ │ ├── lu.php
│ │ ├── luo.php
│ │ ├── luy.php
│ │ ├── lv.php
│ │ ├── lv_LV.php
│ │ ├── lzh.php
│ │ ├── lzh_TW.php
│ │ ├── mag.php
│ │ ├── mag_IN.php
│ │ ├── mai.php
│ │ ├── mai_IN.php
│ │ ├── mas.php
│ │ ├── mas_TZ.php
│ │ ├── mer.php
│ │ ├── mfe.php
│ │ ├── mfe_MU.php
│ │ ├── mg.php
│ │ ├── mg_MG.php
│ │ ├── mgh.php
│ │ ├── mgo.php
│ │ ├── mhr.php
│ │ ├── mhr_RU.php
│ │ ├── mi.php
│ │ ├── mi_NZ.php
│ │ ├── miq.php
│ │ ├── miq_NI.php
│ │ ├── mjw.php
│ │ ├── mjw_IN.php
│ │ ├── mk.php
│ │ ├── mk_MK.php
│ │ ├── ml.php
│ │ ├── ml_IN.php
│ │ ├── mn.php
│ │ ├── mn_MN.php
│ │ ├── mni.php
│ │ ├── mni_IN.php
│ │ ├── mo.php
│ │ ├── mr.php
│ │ ├── mr_IN.php
│ │ ├── ms.php
│ │ ├── ms_BN.php
│ │ ├── ms_MY.php
│ │ ├── ms_SG.php
│ │ ├── mt.php
│ │ ├── mt_MT.php
│ │ ├── mua.php
│ │ ├── my.php
│ │ ├── my_MM.php
│ │ ├── mzn.php
│ │ ├── nan.php
│ │ ├── nan_TW.php
│ │ ├── nan_TW@latin.php
│ │ ├── naq.php
│ │ ├── nb.php
│ │ ├── nb_NO.php
│ │ ├── nb_SJ.php
│ │ ├── nd.php
│ │ ├── nds.php
│ │ ├── nds_DE.php
│ │ ├── nds_NL.php
│ │ ├── ne.php
│ │ ├── ne_IN.php
│ │ ├── ne_NP.php
│ │ ├── nhn.php
│ │ ├── nhn_MX.php
│ │ ├── niu.php
│ │ ├── niu_NU.php
│ │ ├── nl.php
│ │ ├── nl_AW.php
│ │ ├── nl_BE.php
│ │ ├── nl_BQ.php
│ │ ├── nl_CW.php
│ │ ├── nl_NL.php
│ │ ├── nl_SR.php
│ │ ├── nl_SX.php
│ │ ├── nmg.php
│ │ ├── nn.php
│ │ ├── nn_NO.php
│ │ ├── nnh.php
│ │ ├── no.php
│ │ ├── nr.php
│ │ ├── nr_ZA.php
│ │ ├── nso.php
│ │ ├── nso_ZA.php
│ │ ├── nus.php
│ │ ├── nyn.php
│ │ ├── oc.php
│ │ ├── oc_FR.php
│ │ ├── om.php
│ │ ├── om_ET.php
│ │ ├── om_KE.php
│ │ ├── or.php
│ │ ├── or_IN.php
│ │ ├── os.php
│ │ ├── os_RU.php
│ │ ├── pa.php
│ │ ├── pa_Arab.php
│ │ ├── pa_Guru.php
│ │ ├── pa_IN.php
│ │ ├── pa_PK.php
│ │ ├── pap.php
│ │ ├── pap_AW.php
│ │ ├── pap_CW.php
│ │ ├── pl.php
│ │ ├── pl_PL.php
│ │ ├── prg.php
│ │ ├── ps.php
│ │ ├── ps_AF.php
│ │ ├── pt.php
│ │ ├── pt_AO.php
│ │ ├── pt_BR.php
│ │ ├── pt_CH.php
│ │ ├── pt_CV.php
│ │ ├── pt_GQ.php
│ │ ├── pt_GW.php
│ │ ├── pt_LU.php
│ │ ├── pt_MO.php
│ │ ├── pt_MZ.php
│ │ ├── pt_PT.php
│ │ ├── pt_ST.php
│ │ ├── pt_TL.php
│ │ ├── qu.php
│ │ ├── qu_BO.php
│ │ ├── qu_EC.php
│ │ ├── quz.php
│ │ ├── quz_PE.php
│ │ ├── raj.php
│ │ ├── raj_IN.php
│ │ ├── rm.php
│ │ ├── rn.php
│ │ ├── ro.php
│ │ ├── ro_MD.php
│ │ ├── ro_RO.php
│ │ ├── rof.php
│ │ ├── ru.php
│ │ ├── ru_BY.php
│ │ ├── ru_KG.php
│ │ ├── ru_KZ.php
│ │ ├── ru_MD.php
│ │ ├── ru_RU.php
│ │ ├── ru_UA.php
│ │ ├── rw.php
│ │ ├── rw_RW.php
│ │ ├── rwk.php
│ │ ├── sa.php
│ │ ├── sa_IN.php
│ │ ├── sah.php
│ │ ├── sah_RU.php
│ │ ├── saq.php
│ │ ├── sat.php
│ │ ├── sat_IN.php
│ │ ├── sbp.php
│ │ ├── sc.php
│ │ ├── sc_IT.php
│ │ ├── sd.php
│ │ ├── sd_IN.php
│ │ ├── sd_IN@devanagari.php
│ │ ├── se.php
│ │ ├── se_FI.php
│ │ ├── se_NO.php
│ │ ├── se_SE.php
│ │ ├── seh.php
│ │ ├── ses.php
│ │ ├── sg.php
│ │ ├── sgs.php
│ │ ├── sgs_LT.php
│ │ ├── sh.php
│ │ ├── shi.php
│ │ ├── shi_Latn.php
│ │ ├── shi_Tfng.php
│ │ ├── shn.php
│ │ ├── shn_MM.php
│ │ ├── shs.php
│ │ ├── shs_CA.php
│ │ ├── si.php
│ │ ├── si_LK.php
│ │ ├── sid.php
│ │ ├── sid_ET.php
│ │ ├── sk.php
│ │ ├── sk_SK.php
│ │ ├── sl.php
│ │ ├── sl_SI.php
│ │ ├── sm.php
│ │ ├── sm_WS.php
│ │ ├── smn.php
│ │ ├── sn.php
│ │ ├── so.php
│ │ ├── so_DJ.php
│ │ ├── so_ET.php
│ │ ├── so_KE.php
│ │ ├── so_SO.php
│ │ ├── sq.php
│ │ ├── sq_AL.php
│ │ ├── sq_MK.php
│ │ ├── sq_XK.php
│ │ ├── sr.php
│ │ ├── sr_Cyrl.php
│ │ ├── sr_Cyrl_BA.php
│ │ ├── sr_Cyrl_ME.php
│ │ ├── sr_Cyrl_XK.php
│ │ ├── sr_Latn.php
│ │ ├── sr_Latn_BA.php
│ │ ├── sr_Latn_ME.php
│ │ ├── sr_Latn_XK.php
│ │ ├── sr_ME.php
│ │ ├── sr_RS.php
│ │ ├── sr_RS@latin.php
│ │ ├── ss.php
│ │ ├── ss_ZA.php
│ │ ├── st.php
│ │ ├── st_ZA.php
│ │ ├── sv.php
│ │ ├── sv_AX.php
│ │ ├── sv_FI.php
│ │ ├── sv_SE.php
│ │ ├── sw.php
│ │ ├── sw_CD.php
│ │ ├── sw_KE.php
│ │ ├── sw_TZ.php
│ │ ├── sw_UG.php
│ │ ├── szl.php
│ │ ├── szl_PL.php
│ │ ├── ta.php
│ │ ├── ta_IN.php
│ │ ├── ta_LK.php
│ │ ├── ta_MY.php
│ │ ├── ta_SG.php
│ │ ├── tcy.php
│ │ ├── tcy_IN.php
│ │ ├── te.php
│ │ ├── te_IN.php
│ │ ├── teo.php
│ │ ├── teo_KE.php
│ │ ├── tet.php
│ │ ├── tg.php
│ │ ├── tg_TJ.php
│ │ ├── th.php
│ │ ├── th_TH.php
│ │ ├── the.php
│ │ ├── the_NP.php
│ │ ├── ti.php
│ │ ├── ti_ER.php
│ │ ├── ti_ET.php
│ │ ├── tig.php
│ │ ├── tig_ER.php
│ │ ├── tk.php
│ │ ├── tk_TM.php
│ │ ├── tl.php
│ │ ├── tl_PH.php
│ │ ├── tlh.php
│ │ ├── tn.php
│ │ ├── tn_ZA.php
│ │ ├── to.php
│ │ ├── to_TO.php
│ │ ├── tpi.php
│ │ ├── tpi_PG.php
│ │ ├── tr.php
│ │ ├── tr_CY.php
│ │ ├── tr_TR.php
│ │ ├── ts.php
│ │ ├── ts_ZA.php
│ │ ├── tt.php
│ │ ├── tt_RU.php
│ │ ├── tt_RU@iqtelif.php
│ │ ├── twq.php
│ │ ├── tzl.php
│ │ ├── tzm.php
│ │ ├── tzm_Latn.php
│ │ ├── ug.php
│ │ ├── ug_CN.php
│ │ ├── uk.php
│ │ ├── uk_UA.php
│ │ ├── unm.php
│ │ ├── unm_US.php
│ │ ├── ur.php
│ │ ├── ur_IN.php
│ │ ├── ur_PK.php
│ │ ├── uz.php
│ │ ├── uz_Arab.php
│ │ ├── uz_Cyrl.php
│ │ ├── uz_Latn.php
│ │ ├── uz_UZ.php
│ │ ├── uz_UZ@cyrillic.php
│ │ ├── vai.php
│ │ ├── vai_Latn.php
│ │ ├── vai_Vaii.php
│ │ ├── ve.php
│ │ ├── ve_ZA.php
│ │ ├── vi.php
│ │ ├── vi_VN.php
│ │ ├── vo.php
│ │ ├── vun.php
│ │ ├── wa.php
│ │ ├── wa_BE.php
│ │ ├── wae.php
│ │ ├── wae_CH.php
│ │ ├── wal.php
│ │ ├── wal_ET.php
│ │ ├── wo.php
│ │ ├── wo_SN.php
│ │ ├── xh.php
│ │ ├── xh_ZA.php
│ │ ├── xog.php
│ │ ├── yav.php
│ │ ├── yi.php
│ │ ├── yi_US.php
│ │ ├── yo.php
│ │ ├── yo_BJ.php
│ │ ├── yo_NG.php
│ │ ├── yue.php
│ │ ├── yue_HK.php
│ │ ├── yue_Hans.php
│ │ ├── yue_Hant.php
│ │ ├── yuw.php
│ │ ├── yuw_PG.php
│ │ ├── zgh.php
│ │ ├── zh.php
│ │ ├── zh_CN.php
│ │ ├── zh_HK.php
│ │ ├── zh_Hans.php
│ │ ├── zh_Hans_HK.php
│ │ ├── zh_Hans_MO.php
│ │ ├── zh_Hans_SG.php
│ │ ├── zh_Hant.php
│ │ ├── zh_Hant_HK.php
│ │ ├── zh_Hant_MO.php
│ │ ├── zh_Hant_TW.php
│ │ ├── zh_MO.php
│ │ ├── zh_SG.php
│ │ ├── zh_TW.php
│ │ ├── zh_YUE.php
│ │ ├── zu.php
│ │ └── zu_ZA.php
│ ├── Language.php
│ ├── Laravel/
│ │ └── ServiceProvider.php
│ ├── List/
│ │ ├── languages.php
│ │ └── regions.php
│ ├── MessageFormatter/
│ │ └── MessageFormatterMapper.php
│ ├── Month.php
│ ├── PHPStan/
│ │ ├── MacroExtension.php
│ │ └── MacroMethodReflection.php
│ ├── Traits/
│ │ ├── Boundaries.php
│ │ ├── Cast.php
│ │ ├── Comparison.php
│ │ ├── Converter.php
│ │ ├── Creator.php
│ │ ├── Date.php
│ │ ├── DeprecatedPeriodProperties.php
│ │ ├── Difference.php
│ │ ├── IntervalRounding.php
│ │ ├── IntervalStep.php
│ │ ├── LocalFactory.php
│ │ ├── Localization.php
│ │ ├── Macro.php
│ │ ├── MagicParameter.php
│ │ ├── Mixin.php
│ │ ├── Modifiers.php
│ │ ├── Mutability.php
│ │ ├── ObjectInitialisation.php
│ │ ├── Options.php
│ │ ├── Rounding.php
│ │ ├── Serialization.php
│ │ ├── StaticLocalization.php
│ │ ├── StaticOptions.php
│ │ ├── Test.php
│ │ ├── Timestamp.php
│ │ ├── ToStringFormat.php
│ │ ├── Units.php
│ │ └── Week.php
│ ├── Translator.php
│ ├── TranslatorImmutable.php
│ ├── TranslatorStrongTypeInterface.php
│ ├── Unit.php
│ ├── WeekDay.php
│ └── WrapperClock.php
└── tests/
├── AbstractTestCase.php
├── AbstractTestCaseWithOldNow.php
├── Carbon/
│ ├── AddMonthsTest.php
│ ├── AddTest.php
│ ├── ArraysTest.php
│ ├── ComparisonTest.php
│ ├── ConstructTest.php
│ ├── CopyTest.php
│ ├── CreateFromDateTest.php
│ ├── CreateFromFormatTest.php
│ ├── CreateFromTimeStringTest.php
│ ├── CreateFromTimeTest.php
│ ├── CreateFromTimestampTest.php
│ ├── CreateSafeTest.php
│ ├── CreateStrictTest.php
│ ├── CreateTest.php
│ ├── DayOfWeekModifiersTest.php
│ ├── DiffTest.php
│ ├── Exceptions/
│ │ ├── BadComparisonUnitExceptionTest.php
│ │ ├── BadFluentConstructorExceptionTest.php
│ │ ├── BadFluentSetterExceptionTest.php
│ │ ├── ImmutableExceptionTest.php
│ │ ├── InvalidCastExceptionTest.php
│ │ ├── InvalidDateExceptionTest.php
│ │ ├── InvalidFormatExceptionTest.php
│ │ ├── InvalidIntervalExceptionTest.php
│ │ ├── InvalidPeriodDateExceptionTest.php
│ │ ├── InvalidPeriodParameterExceptionTest.php
│ │ ├── InvalidTimeZoneExceptionTest.php
│ │ ├── InvalidTypeExceptionTest.php
│ │ ├── NotACarbonClassExceptionTest.php
│ │ ├── NotAPeriodExceptionTest.php
│ │ ├── NotLocaleAwareExceptionTest.php
│ │ ├── OutOfRangeExceptionTest.php
│ │ ├── ParseErrorExceptionTest.php
│ │ ├── UnitExceptionTest.php
│ │ ├── UnitNotConfiguredExceptionTest.php
│ │ ├── UnknownGetterExceptionTest.php
│ │ ├── UnknownMethodExceptionTest.php
│ │ ├── UnknownSetterExceptionTest.php
│ │ ├── UnknownUnitExceptionTest.php
│ │ └── UnreachableExceptionTest.php
│ ├── ExpressiveComparisonTest.php
│ ├── Fixtures/
│ │ ├── BadIsoCarbon.php
│ │ ├── DumpCarbon.php
│ │ ├── FooBar.php
│ │ ├── Mixin.php
│ │ ├── MyCarbon.php
│ │ └── NoLocaleTranslator.php
│ ├── FluidSettersTest.php
│ ├── GenericMacroTest.php
│ ├── GettersTest.php
│ ├── InstanceTest.php
│ ├── IsTest.php
│ ├── IssetTest.php
│ ├── JsonSerializationTest.php
│ ├── LastErrorTest.php
│ ├── LocalizationTest.php
│ ├── MacroTest.php
│ ├── ModifyNearDSTChangeTest.php
│ ├── ModifyTest.php
│ ├── NowAndOtherStaticHelpersTest.php
│ ├── NowDerivativesTest.php
│ ├── ObjectsTest.php
│ ├── PhpBug72338Test.php
│ ├── RelativeDateStringTest.php
│ ├── RelativeTest.php
│ ├── RoundTest.php
│ ├── SerializationTest.php
│ ├── SetDateAndTimeFromTest.php
│ ├── SettersTest.php
│ ├── SettingsTest.php
│ ├── StartEndOfTest.php
│ ├── StrictModeTest.php
│ ├── StringsTest.php
│ ├── SubTest.php
│ ├── TestingAidsTest.php
│ └── WeekTest.php
├── CarbonImmutable/
│ ├── AddMonthsTest.php
│ ├── AddTest.php
│ ├── ArraysTest.php
│ ├── ComparisonTest.php
│ ├── ConstructTest.php
│ ├── CopyTest.php
│ ├── CreateFromDateTest.php
│ ├── CreateFromFormatTest.php
│ ├── CreateFromTimeStringTest.php
│ ├── CreateFromTimeTest.php
│ ├── CreateFromTimestampTest.php
│ ├── CreateSafeTest.php
│ ├── CreateTest.php
│ ├── DayOfWeekModifiersTest.php
│ ├── DiffTest.php
│ ├── ExpressiveComparisonTest.php
│ ├── Fixtures/
│ │ ├── BadIsoCarbon.php
│ │ ├── Mixin.php
│ │ └── MyCarbon.php
│ ├── FluidSettersTest.php
│ ├── GenericMacroTest.php
│ ├── GettersTest.php
│ ├── InstanceTest.php
│ ├── IsTest.php
│ ├── IssetTest.php
│ ├── JsonSerializationTest.php
│ ├── LastErrorTest.php
│ ├── LocalizationTest.php
│ ├── MacroTest.php
│ ├── ModifyNearDSTChangeTest.php
│ ├── ModifyTest.php
│ ├── NowAndOtherStaticHelpersTest.php
│ ├── NowDerivativesTest.php
│ ├── ObjectsTest.php
│ ├── PhpBug72338Test.php
│ ├── RelativeDateStringTest.php
│ ├── RelativeTest.php
│ ├── RoundTest.php
│ ├── SerializationTest.php
│ ├── SetDateAndTimeFromTest.php
│ ├── SetStateTest.php
│ ├── SettersTest.php
│ ├── SettingsTest.php
│ ├── StartEndOfTest.php
│ ├── StringsTest.php
│ ├── SubTest.php
│ ├── TestingAidsTest.php
│ └── WeekTest.php
├── CarbonInterval/
│ ├── AddTest.php
│ ├── AlternativeNumbersTest.php
│ ├── CascadeTest.php
│ ├── CloneTest.php
│ ├── CompareTest.php
│ ├── ComparisonTest.php
│ ├── ConstructTest.php
│ ├── CreateFromFormatTest.php
│ ├── DivideTest.php
│ ├── Fixtures/
│ │ ├── Mixin.php
│ │ ├── MixinTrait.php
│ │ └── MyCarbonInterval.php
│ ├── FloatSettersEnabledTest.php
│ ├── ForHumansTest.php
│ ├── FromStringTest.php
│ ├── GettersTest.php
│ ├── MacroTest.php
│ ├── MultiplyTest.php
│ ├── ParseFromLocaleTest.php
│ ├── RoundingTest.php
│ ├── SetStateTest.php
│ ├── SettersTest.php
│ ├── SharesTest.php
│ ├── SpecTest.php
│ ├── StrictModeTest.php
│ ├── TimesTest.php
│ ├── ToDateIntervalTest.php
│ ├── ToPeriodTest.php
│ ├── ToStringTest.php
│ └── TotalTest.php
├── CarbonPeriod/
│ ├── AliasTest.php
│ ├── CloneTest.php
│ ├── ComparisonTest.php
│ ├── CreateTest.php
│ ├── DynamicIntervalTest.php
│ ├── FilterTest.php
│ ├── Fixtures/
│ │ ├── AbstractCarbon.php
│ │ ├── CarbonPeriodFactory.php
│ │ ├── FooFilters.php
│ │ ├── MacroableClass.php
│ │ ├── Mixin.php
│ │ ├── MixinTrait.php
│ │ └── filters.php
│ ├── GettersTest.php
│ ├── IterationMethodsTest.php
│ ├── IteratorTest.php
│ ├── MacroTest.php
│ ├── RoundingTest.php
│ ├── SerializationTest.php
│ ├── SettersTest.php
│ ├── StrictModeTest.php
│ ├── ToArrayTest.php
│ ├── ToDatePeriodTest.php
│ └── ToStringTest.php
├── CarbonPeriodImmutable/
│ ├── AliasTest.php
│ ├── CloneTest.php
│ ├── ComparisonTest.php
│ ├── CreateTest.php
│ ├── DynamicIntervalTest.php
│ ├── FilterTest.php
│ ├── GettersTest.php
│ ├── IterationMethodsTest.php
│ ├── IteratorTest.php
│ ├── MacroTest.php
│ ├── RoundingTest.php
│ ├── SettersTest.php
│ ├── StrictModeTest.php
│ ├── ToArrayTest.php
│ ├── ToDatePeriodTest.php
│ └── ToStringTest.php
├── CarbonTimeZone/
│ ├── ConversionsTest.php
│ ├── CreateTest.php
│ ├── Fixtures/
│ │ └── UnknownZone.php
│ └── GettersTest.php
├── Cli/
│ ├── Cli.php
│ └── InvokerTest.php
├── CommonTraits/
│ └── MacroContextNestingTest.php
├── Doctrine/
│ └── CarbonTypesTest.php
├── Factory/
│ ├── CallbackTest.php
│ ├── FactoryTest.php
│ └── WrapperClockTest.php
├── Fixtures/
│ ├── CarbonTimezoneTrait.php
│ ├── CarbonTypeCase.php
│ ├── DateMalformedIntervalStringException.php
│ ├── DateMalformedStringException.php
│ ├── SubCarbon.php
│ ├── SubCarbonImmutable.php
│ ├── dynamicInterval.php
│ └── serialized-interval-from-v2.txt
├── Jenssegers/
│ ├── DateTest.php
│ ├── JenssegersDate.php
│ ├── TestCaseBase.php
│ ├── TranslationElTest.php
│ ├── TranslationHuTest.php
│ ├── TranslationJaTest.php
│ ├── TranslationKaTest.php
│ ├── TranslationTaTest.php
│ ├── TranslationTest.php
│ ├── TranslationThTest.php
│ └── TranslationUkTest.php
├── Language/
│ ├── LanguageTest.php
│ └── TranslatorTest.php
├── Laravel/
│ ├── App.php
│ ├── Dispatcher.php
│ ├── EventDispatcher.php
│ ├── EventDispatcherBase.php
│ ├── ServiceProvider.php
│ ├── ServiceProviderTest.php
│ ├── Translator.php
│ ├── laravel.12.x.multi-tester.yml
│ └── laravel.master.multi-tester.yml
├── Localization/
│ ├── AaDjTest.php
│ ├── AaErSaahoTest.php
│ ├── AaErTest.php
│ ├── AaEtTest.php
│ ├── AaTest.php
│ ├── AfNaTest.php
│ ├── AfTest.php
│ ├── AfZaTest.php
│ ├── AgqTest.php
│ ├── AgrPeTest.php
│ ├── AgrTest.php
│ ├── AkGhTest.php
│ ├── AkTest.php
│ ├── AmEtTest.php
│ ├── AmTest.php
│ ├── AnEsTest.php
│ ├── AnTest.php
│ ├── AnpInTest.php
│ ├── AnpTest.php
│ ├── ArAeTest.php
│ ├── ArBhTest.php
│ ├── ArDjTest.php
│ ├── ArDzTest.php
│ ├── ArEgTest.php
│ ├── ArEhTest.php
│ ├── ArErTest.php
│ ├── ArIlTest.php
│ ├── ArInTest.php
│ ├── ArIqTest.php
│ ├── ArJoTest.php
│ ├── ArKmTest.php
│ ├── ArKwTest.php
│ ├── ArLbTest.php
│ ├── ArLyTest.php
│ ├── ArMaTest.php
│ ├── ArMrTest.php
│ ├── ArOmTest.php
│ ├── ArPsTest.php
│ ├── ArQaTest.php
│ ├── ArSaTest.php
│ ├── ArSdTest.php
│ ├── ArShaklTest.php
│ ├── ArSoTest.php
│ ├── ArSsTest.php
│ ├── ArSyTest.php
│ ├── ArTdTest.php
│ ├── ArTest.php
│ ├── ArTnTest.php
│ ├── ArYeTest.php
│ ├── AsInTest.php
│ ├── AsTest.php
│ ├── AsaTest.php
│ ├── AstEsTest.php
│ ├── AstTest.php
│ ├── AycPeTest.php
│ ├── AycTest.php
│ ├── AzArabTest.php
│ ├── AzAzTest.php
│ ├── AzCyrlTest.php
│ ├── AzIrTest.php
│ ├── AzLatnTest.php
│ ├── AzTest.php
│ ├── BasTest.php
│ ├── BeByLatinTest.php
│ ├── BeByTest.php
│ ├── BeTest.php
│ ├── BemTest.php
│ ├── BemZmTest.php
│ ├── BerDzTest.php
│ ├── BerMaTest.php
│ ├── BerTest.php
│ ├── BezTest.php
│ ├── BgBgTest.php
│ ├── BgTest.php
│ ├── BhbInTest.php
│ ├── BhbTest.php
│ ├── BhoInTest.php
│ ├── BhoTest.php
│ ├── BiTest.php
│ ├── BiVuTest.php
│ ├── BmTest.php
│ ├── BnBdTest.php
│ ├── BnInTest.php
│ ├── BnTest.php
│ ├── BoCnTest.php
│ ├── BoInTest.php
│ ├── BoTest.php
│ ├── BrFrTest.php
│ ├── BrTest.php
│ ├── BrxInTest.php
│ ├── BrxTest.php
│ ├── BsBaTest.php
│ ├── BsCyrlTest.php
│ ├── BsLatnTest.php
│ ├── BsTest.php
│ ├── BynErTest.php
│ ├── BynTest.php
│ ├── CaAdTest.php
│ ├── CaEsTest.php
│ ├── CaEsValenciaTest.php
│ ├── CaFrTest.php
│ ├── CaItTest.php
│ ├── CaTest.php
│ ├── CcpInTest.php
│ ├── CcpTest.php
│ ├── CeRuTest.php
│ ├── CeTest.php
│ ├── CggTest.php
│ ├── ChrTest.php
│ ├── ChrUsTest.php
│ ├── CkbTest.php
│ ├── CmnTest.php
│ ├── CmnTwTest.php
│ ├── CrhTest.php
│ ├── CrhUaTest.php
│ ├── CsCzTest.php
│ ├── CsTest.php
│ ├── CsbPlTest.php
│ ├── CsbTest.php
│ ├── CuTest.php
│ ├── CvRuTest.php
│ ├── CvTest.php
│ ├── CyGbTest.php
│ ├── CyTest.php
│ ├── DaDkTest.php
│ ├── DaGlTest.php
│ ├── DaTest.php
│ ├── DavTest.php
│ ├── DeAtTest.php
│ ├── DeBeTest.php
│ ├── DeChTest.php
│ ├── DeDeTest.php
│ ├── DeItTest.php
│ ├── DeLiTest.php
│ ├── DeLuTest.php
│ ├── DeTest.php
│ ├── DjeTest.php
│ ├── DoiInTest.php
│ ├── DoiTest.php
│ ├── DsbDeTest.php
│ ├── DsbTest.php
│ ├── DuaTest.php
│ ├── DvMvTest.php
│ ├── DvTest.php
│ ├── DyoTest.php
│ ├── DzBtTest.php
│ ├── DzTest.php
│ ├── EbuTest.php
│ ├── EeTest.php
│ ├── EeTgTest.php
│ ├── ElCyTest.php
│ ├── ElGrTest.php
│ ├── ElTest.php
│ ├── En001Test.php
│ ├── En150Test.php
│ ├── EnAgTest.php
│ ├── EnAiTest.php
│ ├── EnAsTest.php
│ ├── EnAtTest.php
│ ├── EnAuTest.php
│ ├── EnBbTest.php
│ ├── EnBeTest.php
│ ├── EnBiTest.php
│ ├── EnBmTest.php
│ ├── EnBsTest.php
│ ├── EnBwTest.php
│ ├── EnBzTest.php
│ ├── EnCaTest.php
│ ├── EnCcTest.php
│ ├── EnChTest.php
│ ├── EnCkTest.php
│ ├── EnCmTest.php
│ ├── EnCxTest.php
│ ├── EnCyTest.php
│ ├── EnDeTest.php
│ ├── EnDgTest.php
│ ├── EnDkTest.php
│ ├── EnDmTest.php
│ ├── EnErTest.php
│ ├── EnFiTest.php
│ ├── EnFjTest.php
│ ├── EnFkTest.php
│ ├── EnFmTest.php
│ ├── EnGbTest.php
│ ├── EnGdTest.php
│ ├── EnGgTest.php
│ ├── EnGhTest.php
│ ├── EnGiTest.php
│ ├── EnGmTest.php
│ ├── EnGuTest.php
│ ├── EnGyTest.php
│ ├── EnHkTest.php
│ ├── EnIeTest.php
│ ├── EnIlTest.php
│ ├── EnImTest.php
│ ├── EnInTest.php
│ ├── EnIoTest.php
│ ├── EnIsoTest.php
│ ├── EnJeTest.php
│ ├── EnJmTest.php
│ ├── EnKeTest.php
│ ├── EnKiTest.php
│ ├── EnKnTest.php
│ ├── EnKyTest.php
│ ├── EnLcTest.php
│ ├── EnLrTest.php
│ ├── EnLsTest.php
│ ├── EnMgTest.php
│ ├── EnMhTest.php
│ ├── EnMoTest.php
│ ├── EnMpTest.php
│ ├── EnMsTest.php
│ ├── EnMtTest.php
│ ├── EnMuTest.php
│ ├── EnMwTest.php
│ ├── EnMyTest.php
│ ├── EnNaTest.php
│ ├── EnNfTest.php
│ ├── EnNgTest.php
│ ├── EnNlTest.php
│ ├── EnNrTest.php
│ ├── EnNuTest.php
│ ├── EnNzTest.php
│ ├── EnPgTest.php
│ ├── EnPhTest.php
│ ├── EnPkTest.php
│ ├── EnPnTest.php
│ ├── EnPrTest.php
│ ├── EnPwTest.php
│ ├── EnRwTest.php
│ ├── EnSbTest.php
│ ├── EnScTest.php
│ ├── EnSdTest.php
│ ├── EnSeTest.php
│ ├── EnSgTest.php
│ ├── EnShTest.php
│ ├── EnSiTest.php
│ ├── EnSlTest.php
│ ├── EnSsTest.php
│ ├── EnSxTest.php
│ ├── EnSzTest.php
│ ├── EnTcTest.php
│ ├── EnTest.php
│ ├── EnTkTest.php
│ ├── EnToTest.php
│ ├── EnTtTest.php
│ ├── EnTvTest.php
│ ├── EnTzTest.php
│ ├── EnUgTest.php
│ ├── EnUmTest.php
│ ├── EnUsPosixTest.php
│ ├── EnUsTest.php
│ ├── EnVcTest.php
│ ├── EnVgTest.php
│ ├── EnViTest.php
│ ├── EnVuTest.php
│ ├── EnWsTest.php
│ ├── EnZaTest.php
│ ├── EnZmTest.php
│ ├── EnZwTest.php
│ ├── EoTest.php
│ ├── Es419Test.php
│ ├── EsArTest.php
│ ├── EsBoTest.php
│ ├── EsBrTest.php
│ ├── EsBzTest.php
│ ├── EsClTest.php
│ ├── EsCoTest.php
│ ├── EsCrTest.php
│ ├── EsCuTest.php
│ ├── EsDoTest.php
│ ├── EsEaTest.php
│ ├── EsEcTest.php
│ ├── EsEsTest.php
│ ├── EsGqTest.php
│ ├── EsGtTest.php
│ ├── EsHnTest.php
│ ├── EsIcTest.php
│ ├── EsMxTest.php
│ ├── EsNiTest.php
│ ├── EsPaTest.php
│ ├── EsPeTest.php
│ ├── EsPhTest.php
│ ├── EsPrTest.php
│ ├── EsPyTest.php
│ ├── EsSvTest.php
│ ├── EsTest.php
│ ├── EsUsTest.php
│ ├── EsUyTest.php
│ ├── EsVeTest.php
│ ├── EtEeTest.php
│ ├── EtTest.php
│ ├── EuEsTest.php
│ ├── EuTest.php
│ ├── EwoTest.php
│ ├── FaAfTest.php
│ ├── FaIrTest.php
│ ├── FaTest.php
│ ├── FfCmTest.php
│ ├── FfGnTest.php
│ ├── FfMrTest.php
│ ├── FfSnTest.php
│ ├── FfTest.php
│ ├── FiFiTest.php
│ ├── FiTest.php
│ ├── FilPhTest.php
│ ├── FilTest.php
│ ├── FoDkTest.php
│ ├── FoFoTest.php
│ ├── FoTest.php
│ ├── FrBeTest.php
│ ├── FrBfTest.php
│ ├── FrBiTest.php
│ ├── FrBjTest.php
│ ├── FrBlTest.php
│ ├── FrCaTest.php
│ ├── FrCdTest.php
│ ├── FrCfTest.php
│ ├── FrCgTest.php
│ ├── FrChTest.php
│ ├── FrCiTest.php
│ ├── FrCmTest.php
│ ├── FrDjTest.php
│ ├── FrDzTest.php
│ ├── FrFrTest.php
│ ├── FrGaTest.php
│ ├── FrGfTest.php
│ ├── FrGnTest.php
│ ├── FrGpTest.php
│ ├── FrGqTest.php
│ ├── FrHtTest.php
│ ├── FrKmTest.php
│ ├── FrLuTest.php
│ ├── FrMaTest.php
│ ├── FrMcTest.php
│ ├── FrMfTest.php
│ ├── FrMgTest.php
│ ├── FrMlTest.php
│ ├── FrMqTest.php
│ ├── FrMrTest.php
│ ├── FrMuTest.php
│ ├── FrNcTest.php
│ ├── FrNeTest.php
│ ├── FrPfTest.php
│ ├── FrPmTest.php
│ ├── FrReTest.php
│ ├── FrRwTest.php
│ ├── FrScTest.php
│ ├── FrSnTest.php
│ ├── FrSyTest.php
│ ├── FrTdTest.php
│ ├── FrTest.php
│ ├── FrTgTest.php
│ ├── FrTnTest.php
│ ├── FrVuTest.php
│ ├── FrWfTest.php
│ ├── FrYtTest.php
│ ├── FurItTest.php
│ ├── FurTest.php
│ ├── FyDeTest.php
│ ├── FyNlTest.php
│ ├── FyTest.php
│ ├── GaIeTest.php
│ ├── GaTest.php
│ ├── GdGbTest.php
│ ├── GdTest.php
│ ├── GezErTest.php
│ ├── GezEtTest.php
│ ├── GezTest.php
│ ├── GlEsTest.php
│ ├── GlTest.php
│ ├── GomLatnTest.php
│ ├── GomTest.php
│ ├── GswChTest.php
│ ├── GswFrTest.php
│ ├── GswLiTest.php
│ ├── GswTest.php
│ ├── GuInTest.php
│ ├── GuTest.php
│ ├── GuzTest.php
│ ├── GvGbTest.php
│ ├── GvTest.php
│ ├── HaGhTest.php
│ ├── HaNeTest.php
│ ├── HaNgTest.php
│ ├── HaTest.php
│ ├── HakTest.php
│ ├── HakTwTest.php
│ ├── HawTest.php
│ ├── HeIlTest.php
│ ├── HeTest.php
│ ├── HiInTest.php
│ ├── HiTest.php
│ ├── HifFjTest.php
│ ├── HifTest.php
│ ├── HneInTest.php
│ ├── HneTest.php
│ ├── HrBaTest.php
│ ├── HrHrTest.php
│ ├── HrTest.php
│ ├── HsbDeTest.php
│ ├── HsbTest.php
│ ├── HtHtTest.php
│ ├── HtTest.php
│ ├── HuHuTest.php
│ ├── HuTest.php
│ ├── HyAmTest.php
│ ├── HyTest.php
│ ├── I18nTest.php
│ ├── IaFrTest.php
│ ├── IaTest.php
│ ├── IdIdTest.php
│ ├── IdTest.php
│ ├── IgNgTest.php
│ ├── IgTest.php
│ ├── IiTest.php
│ ├── IkCaTest.php
│ ├── IkTest.php
│ ├── InTest.php
│ ├── IsIsTest.php
│ ├── IsTest.php
│ ├── ItChTest.php
│ ├── ItItTest.php
│ ├── ItSmTest.php
│ ├── ItTest.php
│ ├── ItVaTest.php
│ ├── IuCaTest.php
│ ├── IuTest.php
│ ├── IwTest.php
│ ├── JaJpTest.php
│ ├── JaTest.php
│ ├── JgoTest.php
│ ├── JmcTest.php
│ ├── JvTest.php
│ ├── KaGeTest.php
│ ├── KaTest.php
│ ├── KabDzTest.php
│ ├── KabTest.php
│ ├── KamTest.php
│ ├── KdeTest.php
│ ├── KeaTest.php
│ ├── KhqTest.php
│ ├── KiTest.php
│ ├── KkKzTest.php
│ ├── KkTest.php
│ ├── KkjTest.php
│ ├── KlGlTest.php
│ ├── KlTest.php
│ ├── KlnTest.php
│ ├── KmKhTest.php
│ ├── KmTest.php
│ ├── KnInTest.php
│ ├── KnTest.php
│ ├── KoKpTest.php
│ ├── KoKrTest.php
│ ├── KoTest.php
│ ├── KokInTest.php
│ ├── KokTest.php
│ ├── KsInDevanagariTest.php
│ ├── KsInTest.php
│ ├── KsTest.php
│ ├── KsbTest.php
│ ├── KsfTest.php
│ ├── KshTest.php
│ ├── KuTest.php
│ ├── KuTrTest.php
│ ├── KwGbTest.php
│ ├── KwTest.php
│ ├── KyKgTest.php
│ ├── KyTest.php
│ ├── LagTest.php
│ ├── LanguagesCoverageTest.php
│ ├── LbLuTest.php
│ ├── LbTest.php
│ ├── LgTest.php
│ ├── LgUgTest.php
│ ├── LiNlTest.php
│ ├── LiTest.php
│ ├── LijItTest.php
│ ├── LijTest.php
│ ├── LktTest.php
│ ├── LnAoTest.php
│ ├── LnCdTest.php
│ ├── LnCfTest.php
│ ├── LnCgTest.php
│ ├── LnTest.php
│ ├── LoLaTest.php
│ ├── LoTest.php
│ ├── LocalizationTestCase.php
│ ├── LrcIqTest.php
│ ├── LrcTest.php
│ ├── LtLtTest.php
│ ├── LtTest.php
│ ├── LuTest.php
│ ├── LuoTest.php
│ ├── LuyTest.php
│ ├── LvLvTest.php
│ ├── LvTest.php
│ ├── LzhTest.php
│ ├── LzhTwTest.php
│ ├── MagInTest.php
│ ├── MagTest.php
│ ├── MaiInTest.php
│ ├── MaiTest.php
│ ├── MasTest.php
│ ├── MasTzTest.php
│ ├── MeTest.php
│ ├── MerTest.php
│ ├── MfeMuTest.php
│ ├── MfeTest.php
│ ├── MgMgTest.php
│ ├── MgTest.php
│ ├── MghTest.php
│ ├── MgoTest.php
│ ├── MhrRuTest.php
│ ├── MhrTest.php
│ ├── MiNzTest.php
│ ├── MiTest.php
│ ├── MiqNiTest.php
│ ├── MiqTest.php
│ ├── MjwInTest.php
│ ├── MjwTest.php
│ ├── MkMkTest.php
│ ├── MkTest.php
│ ├── MlInTest.php
│ ├── MlTest.php
│ ├── MnMnTest.php
│ ├── MnTest.php
│ ├── MniInTest.php
│ ├── MniTest.php
│ ├── MoTest.php
│ ├── MrInTest.php
│ ├── MrTest.php
│ ├── MsBnTest.php
│ ├── MsMyTest.php
│ ├── MsSgTest.php
│ ├── MsTest.php
│ ├── MtMtTest.php
│ ├── MtTest.php
│ ├── MuaTest.php
│ ├── MyMmTest.php
│ ├── MyTest.php
│ ├── MznTest.php
│ ├── NanTest.php
│ ├── NanTwLatinTest.php
│ ├── NanTwTest.php
│ ├── NaqTest.php
│ ├── NbNoTest.php
│ ├── NbSjTest.php
│ ├── NbTest.php
│ ├── NdTest.php
│ ├── NdsDeTest.php
│ ├── NdsNlTest.php
│ ├── NdsTest.php
│ ├── NeInTest.php
│ ├── NeNpTest.php
│ ├── NeTest.php
│ ├── NhnMxTest.php
│ ├── NhnTest.php
│ ├── NiuNuTest.php
│ ├── NiuTest.php
│ ├── NlAwTest.php
│ ├── NlBeTest.php
│ ├── NlBqTest.php
│ ├── NlCwTest.php
│ ├── NlNlTest.php
│ ├── NlSrTest.php
│ ├── NlSxTest.php
│ ├── NlTest.php
│ ├── NmgTest.php
│ ├── NnNoTest.php
│ ├── NnTest.php
│ ├── NnhTest.php
│ ├── NoTest.php
│ ├── NrTest.php
│ ├── NrZaTest.php
│ ├── NsoTest.php
│ ├── NsoZaTest.php
│ ├── NusTest.php
│ ├── NynTest.php
│ ├── OcFrTest.php
│ ├── OcTest.php
│ ├── OmEtTest.php
│ ├── OmKeTest.php
│ ├── OmTest.php
│ ├── OrInTest.php
│ ├── OrTest.php
│ ├── OsRuTest.php
│ ├── OsTest.php
│ ├── PaArabTest.php
│ ├── PaGuruTest.php
│ ├── PaInTest.php
│ ├── PaPkTest.php
│ ├── PaTest.php
│ ├── PapAwTest.php
│ ├── PapCwTest.php
│ ├── PapTest.php
│ ├── PlPlTest.php
│ ├── PlTest.php
│ ├── PrgTest.php
│ ├── PsAfTest.php
│ ├── PsTest.php
│ ├── PtAoTest.php
│ ├── PtBrTest.php
│ ├── PtChTest.php
│ ├── PtCvTest.php
│ ├── PtGqTest.php
│ ├── PtGwTest.php
│ ├── PtLuTest.php
│ ├── PtMoTest.php
│ ├── PtMzTest.php
│ ├── PtPtTest.php
│ ├── PtStTest.php
│ ├── PtTest.php
│ ├── PtTlTest.php
│ ├── QuBoTest.php
│ ├── QuEcTest.php
│ ├── QuTest.php
│ ├── QuzPeTest.php
│ ├── QuzTest.php
│ ├── RajInTest.php
│ ├── RajTest.php
│ ├── RmTest.php
│ ├── RnTest.php
│ ├── RoMdTest.php
│ ├── RoRoTest.php
│ ├── RoTest.php
│ ├── RofTest.php
│ ├── RuByTest.php
│ ├── RuKgTest.php
│ ├── RuKzTest.php
│ ├── RuMdTest.php
│ ├── RuRuTest.php
│ ├── RuTest.php
│ ├── RuUaTest.php
│ ├── RwRwTest.php
│ ├── RwTest.php
│ ├── RwkTest.php
│ ├── SaInTest.php
│ ├── SaTest.php
│ ├── SahRuTest.php
│ ├── SahTest.php
│ ├── SaqTest.php
│ ├── SatInTest.php
│ ├── SatTest.php
│ ├── SbpTest.php
│ ├── ScItTest.php
│ ├── ScTest.php
│ ├── ScrTest.php
│ ├── SdInDevanagariTest.php
│ ├── SdInTest.php
│ ├── SdTest.php
│ ├── SeFiTest.php
│ ├── SeNoTest.php
│ ├── SeSeTest.php
│ ├── SeTest.php
│ ├── SehTest.php
│ ├── SesTest.php
│ ├── SgTest.php
│ ├── SgsLtTest.php
│ ├── SgsTest.php
│ ├── ShTest.php
│ ├── ShiLatnTest.php
│ ├── ShiTest.php
│ ├── ShiTfngTest.php
│ ├── ShnMmTest.php
│ ├── ShnTest.php
│ ├── ShsCaTest.php
│ ├── ShsTest.php
│ ├── SiLkTest.php
│ ├── SiTest.php
│ ├── SidEtTest.php
│ ├── SidTest.php
│ ├── SkSkTest.php
│ ├── SkTest.php
│ ├── SlSiTest.php
│ ├── SlTest.php
│ ├── SmTest.php
│ ├── SmWsTest.php
│ ├── SmnTest.php
│ ├── SnTest.php
│ ├── SoDjTest.php
│ ├── SoEtTest.php
│ ├── SoKeTest.php
│ ├── SoSoTest.php
│ ├── SoTest.php
│ ├── SqAlTest.php
│ ├── SqMkTest.php
│ ├── SqTest.php
│ ├── SqXkTest.php
│ ├── SrCyrlBaTest.php
│ ├── SrCyrlMeTest.php
│ ├── SrCyrlTest.php
│ ├── SrCyrlXkTest.php
│ ├── SrLatnBaTest.php
│ ├── SrLatnMeTest.php
│ ├── SrLatnTest.php
│ ├── SrLatnXkTest.php
│ ├── SrMeTest.php
│ ├── SrRsLatinTest.php
│ ├── SrRsTest.php
│ ├── SrTest.php
│ ├── SsTest.php
│ ├── SsZaTest.php
│ ├── StTest.php
│ ├── StZaTest.php
│ ├── SvAxTest.php
│ ├── SvFiTest.php
│ ├── SvSeTest.php
│ ├── SvTest.php
│ ├── SwCdTest.php
│ ├── SwKeTest.php
│ ├── SwTest.php
│ ├── SwTzTest.php
│ ├── SwUgTest.php
│ ├── SzlPlTest.php
│ ├── SzlTest.php
│ ├── TaInTest.php
│ ├── TaLkTest.php
│ ├── TaMyTest.php
│ ├── TaSgTest.php
│ ├── TaTest.php
│ ├── TcyInTest.php
│ ├── TcyTest.php
│ ├── TeInTest.php
│ ├── TeTest.php
│ ├── TeoKeTest.php
│ ├── TeoTest.php
│ ├── TetTest.php
│ ├── TgTest.php
│ ├── TgTjTest.php
│ ├── ThTest.php
│ ├── ThThTest.php
│ ├── TheNpTest.php
│ ├── TheTest.php
│ ├── TiErTest.php
│ ├── TiEtTest.php
│ ├── TiTest.php
│ ├── TigErTest.php
│ ├── TigTest.php
│ ├── TkTest.php
│ ├── TkTmTest.php
│ ├── TlPhTest.php
│ ├── TlTest.php
│ ├── TlhTest.php
│ ├── TnTest.php
│ ├── TnZaTest.php
│ ├── ToTest.php
│ ├── ToToTest.php
│ ├── TpiPgTest.php
│ ├── TpiTest.php
│ ├── TrCyTest.php
│ ├── TrTest.php
│ ├── TrTrTest.php
│ ├── TsTest.php
│ ├── TsZaTest.php
│ ├── TtRuIqtelifTest.php
│ ├── TtRuTest.php
│ ├── TtTest.php
│ ├── TwqTest.php
│ ├── TzlTest.php
│ ├── TzmLatnTest.php
│ ├── TzmTest.php
│ ├── UgCnTest.php
│ ├── UgTest.php
│ ├── UkTest.php
│ ├── UkUaTest.php
│ ├── UnmTest.php
│ ├── UnmUsTest.php
│ ├── UrInTest.php
│ ├── UrPkTest.php
│ ├── UrTest.php
│ ├── UzArabTest.php
│ ├── UzCyrlTest.php
│ ├── UzLatnTest.php
│ ├── UzTest.php
│ ├── UzUzCyrillicTest.php
│ ├── UzUzTest.php
│ ├── VaiLatnTest.php
│ ├── VaiTest.php
│ ├── VaiVaiiTest.php
│ ├── VeTest.php
│ ├── VeZaTest.php
│ ├── ViTest.php
│ ├── ViVnTest.php
│ ├── VoTest.php
│ ├── VunTest.php
│ ├── WaBeTest.php
│ ├── WaTest.php
│ ├── WaeChTest.php
│ ├── WaeTest.php
│ ├── WalEtTest.php
│ ├── WalTest.php
│ ├── WoSnTest.php
│ ├── WoTest.php
│ ├── XhTest.php
│ ├── XhZaTest.php
│ ├── XogTest.php
│ ├── YavTest.php
│ ├── YiTest.php
│ ├── YiUsTest.php
│ ├── YoBjTest.php
│ ├── YoNgTest.php
│ ├── YoTest.php
│ ├── YueHansTest.php
│ ├── YueHantTest.php
│ ├── YueHkTest.php
│ ├── YueTest.php
│ ├── YuwPgTest.php
│ ├── YuwTest.php
│ ├── ZghTest.php
│ ├── ZhCnTest.php
│ ├── ZhHansHkTest.php
│ ├── ZhHansMoTest.php
│ ├── ZhHansSgTest.php
│ ├── ZhHansTest.php
│ ├── ZhHantHkTest.php
│ ├── ZhHantMoTest.php
│ ├── ZhHantTest.php
│ ├── ZhHantTwTest.php
│ ├── ZhHkTest.php
│ ├── ZhMoTest.php
│ ├── ZhSgTest.php
│ ├── ZhTest.php
│ ├── ZhTwTest.php
│ ├── ZhYueTest.php
│ ├── ZuTest.php
│ └── ZuZaTest.php
├── PHPStan/
│ ├── FeaturesTest.php
│ ├── Fixture.php
│ ├── MacroExtensionTest.php
│ ├── MixinClass.php
│ ├── bad-project.neon
│ ├── bootstrap-non-static.php
│ ├── bootstrap.php
│ └── project.neon
├── PHPUnit/
│ ├── AssertObjectHasPropertyNoopTrait.php
│ ├── AssertObjectHasPropertyPolyfillTrait.php
│ └── AssertObjectHasPropertyTrait.php
├── Unit/
│ ├── MonthTest.php
│ ├── UnitTest.php
│ └── WeekDayTest.php
├── bootstrap.php
├── phpmd-test.xml
└── remove-comments-in-switch.php
Showing preview only (536K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (5659 symbols across 1166 files)
FILE: build.php
function getPhpLevel (line 47) | function getPhpLevel($tag)
FILE: lazy/Carbon/MessageFormatter/MessageFormatterMapperStrongType.php
class LazyMessageFormatter (line 17) | abstract class LazyMessageFormatter implements MessageFormatterInterface
method format (line 19) | public function format(string $message, string $locale, array $paramet...
FILE: lazy/Carbon/MessageFormatter/MessageFormatterMapperWeakType.php
class LazyMessageFormatter (line 18) | abstract class LazyMessageFormatter implements MessageFormatterInterface...
method transformLocale (line 20) | abstract protected function transformLocale(?string $locale): ?string;
method format (line 22) | public function format($message, $locale, array $parameters = [])
method choiceFormat (line 31) | public function choiceFormat($message, $number, $locale, array $parame...
FILE: lazy/Carbon/ProtectedDatePeriod.php
class DatePeriodBase (line 17) | class DatePeriodBase extends DatePeriod
FILE: lazy/Carbon/TranslatorStrongType.php
class LazyTranslator (line 17) | class LazyTranslator extends AbstractTranslator implements TranslatorStr...
method trans (line 19) | public function trans(?string $id, array $parameters = [], ?string $do...
method getFromCatalogue (line 24) | public function getFromCatalogue(MessageCatalogueInterface $catalogue,...
method getPrivateProperty (line 45) | private function getPrivateProperty($instance, string $field)
FILE: lazy/Carbon/TranslatorWeakType.php
class LazyTranslator (line 15) | class LazyTranslator extends AbstractTranslator
method trans (line 27) | public function trans($id, array $parameters = [], $domain = null, $lo...
FILE: lazy/Carbon/UnprotectedDatePeriod.php
class DatePeriodBase (line 17) | class DatePeriodBase extends DatePeriod
FILE: phpdoc.php
function unitName (line 67) | function unitName($unit)
function pluralize (line 76) | function pluralize($word)
function dumpValue (line 85) | function dumpValue($value)
function cleanClassName (line 101) | function cleanClassName($name)
function dumpType (line 118) | function dumpType(ReflectionType $type, bool $deep = true, bool $allowsN...
function dumpParameter (line 142) | function dumpParameter(string $method, ReflectionParameter $parameter): ...
function compileDoc (line 655) | function compileDoc($autoDocLines, $file)
function getMethodReturnType (line 735) | function getMethodReturnType(ReflectionMethod $method): string
FILE: sponsors.php
function getMaxHistoryMonthsByAmount (line 16) | function getMaxHistoryMonthsByAmount($amount): int
function getHtmlAttribute (line 29) | function getHtmlAttribute($rawValue): string
function getOpenCollectiveSponsors (line 38) | function getOpenCollectiveSponsors(): string
FILE: src/Carbon/AbstractTranslator.php
class AbstractTranslator (line 26) | abstract class AbstractTranslator extends SymfonyTranslator
method get (line 73) | public static function get(?string $locale = null): static
method __construct (line 91) | public function __construct($locale, ?MessageFormatterInterface $forma...
method getDirectories (line 99) | public function getDirectories(): array
method setDirectories (line 111) | public function setDirectories(array $directories): static
method addDirectory (line 125) | public function addDirectory(string $directory): static
method removeDirectory (line 139) | public function removeDirectory(string $directory): static
method resetMessages (line 154) | public function resetMessages(?string $locale = null): bool
method getLocalesFiles (line 200) | public function getLocalesFiles(string $prefix = ''): array
method getAvailableLocales (line 221) | public function getAvailableLocales(string $prefix = ''): array
method translate (line 232) | protected function translate(?string $id, array $parameters = [], ?str...
method loadMessagesFromFile (line 265) | protected function loadMessagesFromFile(string $locale): bool
method setMessages (line 278) | public function setMessages(string $locale, array $messages): static
method setTranslations (line 297) | public function setTranslations(array $messages): static
method getMessages (line 306) | public function getMessages(?string $locale = null): array
method setLocale (line 316) | public function setLocale($locale): void
method __debugInfo (line 381) | public function __debugInfo()
method __serialize (line 388) | public function __serialize(): array
method __unserialize (line 395) | public function __unserialize(array $data): void
method initialize (line 400) | private function initialize($locale, ?MessageFormatterInterface $forma...
method compareChunkLists (line 410) | private static function compareChunkLists($referenceChunks, $chunks)
method modifyResources (line 430) | private function modifyResources(callable $callback): void
method getPhpFilesInDirectory (line 441) | private static function getPhpFilesInDirectory(string $directory, stri...
method getDefaultLangDirectory (line 464) | private static function getDefaultLangDirectory(): string
method getInternallySupportedLocales (line 470) | private static function getInternallySupportedLocales(): array
FILE: src/Carbon/Callback.php
class Callback (line 26) | final class Callback
method __construct (line 30) | private function __construct(private readonly Closure $closure)
method fromClosure (line 34) | public static function fromClosure(Closure $closure): self
method parameter (line 39) | public static function parameter(mixed $closure, mixed $value, string|...
method getReflectionFunction (line 48) | public function getReflectionFunction(): ReflectionFunction
method prepareParameter (line 53) | public function prepareParameter(mixed $value, string|int $index = 0):...
method call (line 80) | public function call(mixed ...$arguments): mixed
method getParameterType (line 91) | private function getParameterType(string|int $index): ?ReflectionType
method getPromotedClass (line 109) | private function getPromotedClass(mixed $value): ?string
FILE: src/Carbon/Carbon.php
class Carbon (line 836) | class Carbon extends DateTime implements CarbonInterface
method isMutable (line 843) | public static function isMutable(): bool
FILE: src/Carbon/CarbonConverterInterface.php
type CarbonConverterInterface (line 18) | interface CarbonConverterInterface
method convertDate (line 20) | public function convertDate(DateTimeInterface $dateTime, bool $negated...
FILE: src/Carbon/CarbonImmutable.php
class CarbonImmutable (line 836) | class CarbonImmutable extends DateTimeImmutable implements CarbonInterface
method __clone (line 842) | public function __clone(): void
method startOfTime (line 854) | public static function startOfTime(): static
method endOfTime (line 867) | public static function endOfTime(): static
method getEndOfTimeYear (line 878) | private static function getEndOfTimeYear(): int
method getStartOfTimeYear (line 886) | private static function getStartOfTimeYear(): int
FILE: src/Carbon/CarbonInterface.php
type CarbonInterface (line 858) | interface CarbonInterface extends DateTimeInterface, JsonSerializable, D...
method __call (line 870) | public function __call(string $method, array $parameters): mixed;
method __callStatic (line 880) | public static function __callStatic(string $method, array $parameters)...
method __clone (line 885) | public function __clone(): void;
method __construct (line 895) | public function __construct(DateTimeInterface|WeekDay|Month|string|int...
method __debugInfo (line 900) | public function __debugInfo(): array;
method __get (line 909) | public function __get(string $name): mixed;
method __isset (line 918) | public function __isset($name);
method __set (line 930) | public function __set($name, $value);
method __set_state (line 939) | #[ReturnTypeWillChange]
method __toString (line 950) | public function __toString();
method add (line 965) | #[ReturnTypeWillChange]
method addRealUnit (line 979) | public function addRealUnit(string $unit, $value = 1): static;
method addUTCUnit (line 990) | public function addUTCUnit(string $unit, $value = 1): static;
method addUnit (line 995) | public function addUnit(Unit|string $unit, $value = 1, ?bool $overflow...
method addUnitNoOverflow (line 1004) | public function addUnitNoOverflow(string $valueUnit, int $value, strin...
method ago (line 1034) | public function ago($syntax = null, $short = false, $parts = 1, $optio...
method average (line 1044) | public function average($date = null);
method avoidMutation (line 1054) | public function avoidMutation(): static;
method between (line 1073) | public function between(DateTimeInterface|string $date1, DateTimeInter...
method betweenExcluded (line 1085) | public function betweenExcluded(DateTimeInterface|string $date1, DateT...
method betweenIncluded (line 1097) | public function betweenIncluded(DateTimeInterface|string $date1, DateT...
method calendar (line 1110) | public function calendar($referenceTime = null, array $formats = []);
method canBeCreatedFromFormat (line 1122) | public static function canBeCreatedFromFormat(?string $date, string $f...
method carbonize (line 1132) | public function carbonize($date = null);
method cast (line 1143) | public function cast(string $className): mixed;
method ceil (line 1148) | public function ceil(DateInterval|string|int|float $precision = 1): st...
method ceilUnit (line 1153) | public function ceilUnit(string $unit, DateInterval|string|int|float $...
method ceilWeek (line 1160) | public function ceilWeek(WeekDay|int|null $weekStartsAt = null): static;
method change (line 1176) | public function change($modifier);
method cleanupDumpProperties (line 1185) | public function cleanupDumpProperties();
method clone (line 1194) | public function clone();
method closest (line 1204) | public function closest($date1, $date2);
method copy (line 1211) | public function copy();
method create (line 1237) | public static function create($year = 0, $month = 1, $day = 1, $hour =...
method createFromDate (line 1251) | public static function createFromDate($year = null, $month = null, $da...
method createFromFormat (line 1264) | #[ReturnTypeWillChange]
method createFromIsoFormat (line 1280) | public static function createFromIsoFormat(string $format, string $tim...
method createFromLocaleFormat (line 1294) | public static function createFromLocaleFormat(string $format, string $...
method createFromLocaleIsoFormat (line 1308) | public static function createFromLocaleIsoFormat(string $format, strin...
method createFromTime (line 1322) | public static function createFromTime($hour = 0, $minute = 0, $second ...
method createFromTimeString (line 1329) | public static function createFromTimeString(string $time, DateTimeZone...
method createFromTimestamp (line 1336) | #[ReturnTypeWillChange]
method createFromTimestampMs (line 1344) | public static function createFromTimestampMs(string|int|float $timesta...
method createFromTimestampMsUTC (line 1355) | public static function createFromTimestampMsUTC($timestamp): static;
method createFromTimestampUTC (line 1362) | public static function createFromTimestampUTC(string|int|float $timest...
method createMidnightDate (line 1376) | public static function createMidnightDate($year = null, $month = null,...
method createSafe (line 1405) | public static function createSafe($year = null, $month = null, $day = ...
method createStrict (line 1424) | public static function createStrict(?int $year = 0, ?int $month = 1, ?...
method dayOfYear (line 1439) | public function dayOfYear(?int $value = null): static|int;
method diffAsCarbonInterval (line 1451) | public function diffAsCarbonInterval($date = null, bool $absolute = fa...
method diffAsDateInterval (line 1463) | public function diffAsDateInterval($date = null, bool $absolute = fals...
method diffFiltered (line 1475) | public function diffFiltered(CarbonInterval $ci, Closure $callback, $d...
method diffForHumans (line 1527) | public function diffForHumans($other = null, $syntax = null, $short = ...
method diffInDays (line 1538) | public function diffInDays($date = null, bool $absolute = false, bool ...
method diffInDaysFiltered (line 1549) | public function diffInDaysFiltered(Closure $callback, $date = null, bo...
method diffInHours (line 1559) | public function diffInHours($date = null, bool $absolute = false): float;
method diffInHoursFiltered (line 1570) | public function diffInHoursFiltered(Closure $callback, $date = null, b...
method diffInMicroseconds (line 1580) | public function diffInMicroseconds($date = null, bool $absolute = fals...
method diffInMilliseconds (line 1590) | public function diffInMilliseconds($date = null, bool $absolute = fals...
method diffInMinutes (line 1600) | public function diffInMinutes($date = null, bool $absolute = false): f...
method diffInMonths (line 1611) | public function diffInMonths($date = null, bool $absolute = false, boo...
method diffInQuarters (line 1622) | public function diffInQuarters($date = null, bool $absolute = false, b...
method diffInSeconds (line 1632) | public function diffInSeconds($date = null, bool $absolute = false): f...
method diffInUnit (line 1644) | public function diffInUnit(Unit|string $unit, $date = null, bool $abso...
method diffInWeekdays (line 1654) | public function diffInWeekdays($date = null, bool $absolute = false): ...
method diffInWeekendDays (line 1664) | public function diffInWeekendDays($date = null, bool $absolute = false...
method diffInWeeks (line 1675) | public function diffInWeeks($date = null, bool $absolute = false, bool...
method diffInYears (line 1686) | public function diffInYears($date = null, bool $absolute = false, bool...
method disableHumanDiffOption (line 1693) | public static function disableHumanDiffOption(int $humanDiffOption): v...
method enableHumanDiffOption (line 1700) | public static function enableHumanDiffOption(int $humanDiffOption): void;
method endOf (line 1712) | public function endOf(Unit|string $unit, mixed ...$params): static;
method endOfCentury (line 1724) | public function endOfCentury();
method endOfDay (line 1736) | public function endOfDay();
method endOfDecade (line 1748) | public function endOfDecade();
method endOfHour (line 1758) | public function endOfHour(): static;
method endOfMillennium (line 1770) | public function endOfMillennium();
method endOfMillisecond (line 1782) | public function endOfMillisecond(): static;
method endOfMinute (line 1792) | public function endOfMinute(): static;
method endOfMonth (line 1804) | public function endOfMonth();
method endOfQuarter (line 1816) | public function endOfQuarter();
method endOfSecond (line 1828) | public function endOfSecond(): static;
method endOfWeek (line 1844) | public function endOfWeek(WeekDay|int|null $weekEndsAt = null): static;
method endOfYear (line 1856) | public function endOfYear();
method eq (line 1870) | public function eq(DateTimeInterface|string $date): bool;
method equalTo (line 1882) | public function equalTo(DateTimeInterface|string $date): bool;
method executeWithLocale (line 1893) | public static function executeWithLocale(string $locale, callable $fun...
method farthest (line 1903) | public function farthest($date1, $date2);
method firstOfMonth (line 1915) | public function firstOfMonth($dayOfWeek = null);
method firstOfQuarter (line 1927) | public function firstOfQuarter($dayOfWeek = null);
method firstOfYear (line 1939) | public function firstOfYear($dayOfWeek = null);
method floor (line 1944) | public function floor(DateInterval|string|int|float $precision = 1): s...
method floorUnit (line 1949) | public function floorUnit(string $unit, DateInterval|string|int|float ...
method floorWeek (line 1956) | public function floorWeek(WeekDay|int|null $weekStartsAt = null): static;
method from (line 1992) | public function from($other = null, $syntax = null, $short = false, $p...
method fromNow (line 2022) | public function fromNow($syntax = null, $short = false, $parts = 1, $o...
method fromSerialized (line 2042) | public static function fromSerialized($value, array $options = []): st...
method genericMacro (line 2052) | public static function genericMacro(callable $macro, int $priority = 0...
method get (line 2061) | public function get(Unit|string $name): mixed;
method getAltNumber (line 2068) | public function getAltNumber(string $key): string;
method getAvailableLocales (line 2076) | public static function getAvailableLocales();
method getAvailableLocalesInfo (line 2084) | public static function getAvailableLocalesInfo();
method getCalendarFormats (line 2091) | public function getCalendarFormats(?string $locale = null): array;
method getClock (line 2093) | public function getClock(): ?WrapperClock;
method getDays (line 2098) | public static function getDays(): array;
method getDaysFromStartOfWeek (line 2108) | public function getDaysFromStartOfWeek(WeekDay|int|null $weekStartsAt ...
method getFallbackLocale (line 2115) | public static function getFallbackLocale(): ?string;
method getFormatsToIsoReplacements (line 2120) | public static function getFormatsToIsoReplacements(): array;
method getHumanDiffOptions (line 2125) | public static function getHumanDiffOptions(): int;
method getIsoFormats (line 2132) | public function getIsoFormats(?string $locale = null): array;
method getIsoUnits (line 2137) | public static function getIsoUnits(): array;
method getLastErrors (line 2142) | public static function getLastErrors(): array|false;
method getLocalMacro (line 2147) | public function getLocalMacro(string $name): ?callable;
method getLocalTranslator (line 2152) | public function getLocalTranslator(): TranslatorInterface;
method getLocale (line 2159) | public static function getLocale(): string;
method getMacro (line 2164) | public static function getMacro(string $name): ?callable;
method getMidDayAt (line 2171) | public static function getMidDayAt();
method getOffsetString (line 2181) | public function getOffsetString(string $separator = ':'): string;
method getPaddedUnit (line 2191) | public function getPaddedUnit($unit, $length = 2, $padString = '0', $p...
method getPreciseTimestamp (line 2211) | public function getPreciseTimestamp($precision = 6): float;
method getSettings (line 2216) | public function getSettings(): array;
method getTestNow (line 2224) | public static function getTestNow(): Closure|self|null;
method getTimeFormatByPrecision (line 2231) | public static function getTimeFormatByPrecision(string $unitPrecision)...
method getTimestampMs (line 2238) | public function getTimestampMs(): int;
method getTranslatedDayName (line 2247) | public function getTranslatedDayName(?string $context = null, string $...
method getTranslatedMinDayName (line 2254) | public function getTranslatedMinDayName(?string $context = null): string;
method getTranslatedMonthName (line 2263) | public function getTranslatedMonthName(?string $context = null, string...
method getTranslatedShortDayName (line 2270) | public function getTranslatedShortDayName(?string $context = null): st...
method getTranslatedShortMonthName (line 2277) | public function getTranslatedShortMonthName(?string $context = null): ...
method getTranslationMessage (line 2289) | public function getTranslationMessage(string $key, ?string $locale = n...
method getTranslationMessageWith (line 2301) | public static function getTranslationMessageWith($translator, string $...
method getTranslator (line 2306) | public static function getTranslator(): TranslatorInterface;
method getWeekEndsAt (line 2315) | public static function getWeekEndsAt(?string $locale = null): int;
method getWeekStartsAt (line 2322) | public static function getWeekStartsAt(?string $locale = null): int;
method getWeekendDays (line 2327) | public static function getWeekendDays(): array;
method greaterThan (line 2339) | public function greaterThan(DateTimeInterface|string $date): bool;
method greaterThanOrEqualTo (line 2351) | public function greaterThanOrEqualTo(DateTimeInterface|string $date): ...
method gt (line 2365) | public function gt(DateTimeInterface|string $date): bool;
method gte (line 2379) | public function gte(DateTimeInterface|string $date): bool;
method hasFormat (line 2390) | public static function hasFormat(string $date, string $format): bool;
method hasFormatWithModifiers (line 2406) | public static function hasFormatWithModifiers(?string $date, string $f...
method hasLocalMacro (line 2411) | public function hasLocalMacro(string $name): bool;
method hasLocalTranslator (line 2416) | public function hasLocalTranslator(): bool;
method hasMacro (line 2425) | public static function hasMacro(string $name): bool;
method hasRelativeKeywords (line 2432) | public static function hasRelativeKeywords(?string $time): bool;
method hasTestNow (line 2440) | public static function hasTestNow(): bool;
method instance (line 2445) | public static function instance(DateTimeInterface $date): static;
method is (line 2469) | public function is(WeekDay|Month|string $tester): bool;
method isAfter (line 2483) | public function isAfter(DateTimeInterface|string $date): bool;
method isBefore (line 2497) | public function isBefore(DateTimeInterface|string $date): bool;
method isBetween (line 2512) | public function isBetween(DateTimeInterface|string $date1, DateTimeInt...
method isBirthday (line 2529) | public function isBirthday(DateTimeInterface|string|null $date = null)...
method isCurrentUnit (line 2544) | public function isCurrentUnit(string $unit): bool;
method isDayOfWeek (line 2561) | public function isDayOfWeek($dayOfWeek): bool;
method isEndOfCentury (line 2566) | public function isEndOfCentury(Unit|DateInterval|Closure|CarbonConvert...
method isEndOfDay (line 2588) | public function isEndOfDay(Unit|DateInterval|Closure|CarbonConverterIn...
method isEndOfDecade (line 2593) | public function isEndOfDecade(Unit|DateInterval|Closure|CarbonConverte...
method isEndOfHour (line 2598) | public function isEndOfHour(Unit|DateInterval|Closure|CarbonConverterI...
method isEndOfMillennium (line 2603) | public function isEndOfMillennium(Unit|DateInterval|Closure|CarbonConv...
method isEndOfMillisecond (line 2608) | public function isEndOfMillisecond(Unit|DateInterval|Closure|CarbonCon...
method isEndOfMinute (line 2613) | public function isEndOfMinute(Unit|DateInterval|Closure|CarbonConverte...
method isEndOfMonth (line 2618) | public function isEndOfMonth(Unit|DateInterval|Closure|CarbonConverter...
method isEndOfQuarter (line 2623) | public function isEndOfQuarter(Unit|DateInterval|Closure|CarbonConvert...
method isEndOfSecond (line 2628) | public function isEndOfSecond(Unit|DateInterval|Closure|CarbonConverte...
method isEndOfTime (line 2635) | public function isEndOfTime(): bool;
method isEndOfUnit (line 2646) | public function isEndOfUnit(Unit $unit, Unit|DateInterval|Closure|Carb...
method isEndOfWeek (line 2657) | public function isEndOfWeek(Unit|DateInterval|Closure|CarbonConverterI...
method isEndOfYear (line 2662) | public function isEndOfYear(Unit|DateInterval|Closure|CarbonConverterI...
method isFuture (line 2673) | public function isFuture(): bool;
method isImmutable (line 2678) | public static function isImmutable(): bool;
method isLastOfMonth (line 2692) | public function isLastOfMonth(): bool;
method isLeapYear (line 2703) | public function isLeapYear(): bool;
method isLongIsoYear (line 2719) | public function isLongIsoYear(): bool;
method isLongYear (line 2737) | public function isLongYear(): bool;
method isMidday (line 2750) | public function isMidday(): bool;
method isMidnight (line 2762) | public function isMidnight(): bool;
method isModifiableUnit (line 2771) | public static function isModifiableUnit($unit): bool;
method isMutable (line 2776) | public static function isMutable(): bool;
method isNowOrFuture (line 2788) | public function isNowOrFuture(): bool;
method isNowOrPast (line 2800) | public function isNowOrPast(): bool;
method isPast (line 2811) | public function isPast(): bool;
method isSameAs (line 2825) | public function isSameAs(string $format, DateTimeInterface|string $dat...
method isSameMonth (line 2843) | public function isSameMonth(DateTimeInterface|string $date, bool $ofSa...
method isSameQuarter (line 2861) | public function isSameQuarter(DateTimeInterface|string $date, bool $of...
method isSameUnit (line 2879) | public function isSameUnit(string $unit, DateTimeInterface|string $dat...
method isStartOfCentury (line 2884) | public function isStartOfCentury(Unit|DateInterval|Closure|CarbonConve...
method isStartOfDay (line 2904) | public function isStartOfDay(Unit|DateInterval|Closure|CarbonConverter...
method isStartOfDecade (line 2909) | public function isStartOfDecade(Unit|DateInterval|Closure|CarbonConver...
method isStartOfHour (line 2914) | public function isStartOfHour(Unit|DateInterval|Closure|CarbonConverte...
method isStartOfMillennium (line 2919) | public function isStartOfMillennium(Unit|DateInterval|Closure|CarbonCo...
method isStartOfMillisecond (line 2924) | public function isStartOfMillisecond(Unit|DateInterval|Closure|CarbonC...
method isStartOfMinute (line 2929) | public function isStartOfMinute(Unit|DateInterval|Closure|CarbonConver...
method isStartOfMonth (line 2934) | public function isStartOfMonth(Unit|DateInterval|Closure|CarbonConvert...
method isStartOfQuarter (line 2939) | public function isStartOfQuarter(Unit|DateInterval|Closure|CarbonConve...
method isStartOfSecond (line 2944) | public function isStartOfSecond(Unit|DateInterval|Closure|CarbonConver...
method isStartOfTime (line 2951) | public function isStartOfTime(): bool;
method isStartOfUnit (line 2962) | public function isStartOfUnit(Unit $unit, Unit|DateInterval|Closure|Ca...
method isStartOfWeek (line 2973) | public function isStartOfWeek(Unit|DateInterval|Closure|CarbonConverte...
method isStartOfYear (line 2978) | public function isStartOfYear(Unit|DateInterval|Closure|CarbonConverte...
method isStrictModeEnabled (line 2986) | public static function isStrictModeEnabled(): bool;
method isToday (line 2997) | public function isToday(): bool;
method isTomorrow (line 3008) | public function isTomorrow(): bool;
method isWeekday (line 3019) | public function isWeekday(): bool;
method isWeekend (line 3030) | public function isWeekend(): bool;
method isYesterday (line 3041) | public function isYesterday(): bool;
method isoFormat (line 3048) | public function isoFormat(string $format, ?string $originalFormat = nu...
method isoWeek (line 3061) | public function isoWeek($week = null, $dayOfWeek = null, $dayOfYear = ...
method isoWeekYear (line 3074) | public function isoWeekYear($year = null, $dayOfWeek = null, $dayOfYea...
method isoWeekday (line 3081) | public function isoWeekday(WeekDay|int|null $value = null): static|int;
method isoWeeksInYear (line 3093) | public function isoWeeksInYear($dayOfWeek = null, $dayOfYear = null);
method jsonSerialize (line 3098) | public function jsonSerialize(): mixed;
method lastOfMonth (line 3110) | public function lastOfMonth($dayOfWeek = null);
method lastOfQuarter (line 3122) | public function lastOfQuarter($dayOfWeek = null);
method lastOfYear (line 3134) | public function lastOfYear($dayOfWeek = null);
method lessThan (line 3146) | public function lessThan(DateTimeInterface|string $date): bool;
method lessThanOrEqualTo (line 3158) | public function lessThanOrEqualTo(DateTimeInterface|string $date): bool;
method locale (line 3168) | public function locale(?string $locale = null, string ...$fallbackLoca...
method localeHasDiffOneDayWords (line 3178) | public static function localeHasDiffOneDayWords(string $locale): bool;
method localeHasDiffSyntax (line 3188) | public static function localeHasDiffSyntax(string $locale): bool;
method localeHasDiffTwoDayWords (line 3198) | public static function localeHasDiffTwoDayWords(string $locale): bool;
method localeHasPeriodSyntax (line 3208) | public static function localeHasPeriodSyntax($locale);
method localeHasShortUnits (line 3218) | public static function localeHasShortUnits(string $locale): bool;
method lt (line 3232) | public function lt(DateTimeInterface|string $date): bool;
method lte (line 3246) | public function lte(DateTimeInterface|string $date): bool;
method macro (line 3267) | public static function macro(string $name, ?callable $macro): void;
method make (line 3281) | public static function make($var, DateTimeZone|string|null $timezone =...
method max (line 3290) | public function max($date = null);
method maximum (line 3301) | public function maximum($date = null);
method meridiem (line 3308) | public function meridiem(bool $isLower = false): string;
method midDay (line 3315) | public function midDay();
method min (line 3324) | public function min($date = null);
method minimum (line 3335) | public function minimum($date = null);
method mixin (line 3364) | public static function mixin(object|string $mixin): void;
method modify (line 3373) | #[ReturnTypeWillChange]
method ne (line 3388) | public function ne(DateTimeInterface|string $date): bool;
method next (line 3400) | public function next($modifier = null);
method nextWeekday (line 3407) | public function nextWeekday();
method nextWeekendDay (line 3414) | public function nextWeekendDay();
method notEqualTo (line 3426) | public function notEqualTo(DateTimeInterface|string $date): bool;
method now (line 3431) | public static function now(DateTimeZone|string|int|null $timezone = nu...
method nowWithSameTz (line 3438) | public function nowWithSameTz(): static;
method nthOfMonth (line 3451) | public function nthOfMonth($nth, $dayOfWeek);
method nthOfQuarter (line 3464) | public function nthOfQuarter($nth, $dayOfWeek);
method nthOfYear (line 3477) | public function nthOfYear($nth, $dayOfWeek);
method ordinal (line 3482) | public function ordinal(string $key, ?string $period = null): string;
method parse (line 3493) | public static function parse(DateTimeInterface|WeekDay|Month|string|in...
method parseFromLocale (line 3505) | public static function parseFromLocale(string $time, ?string $locale =...
method pluralUnit (line 3510) | public static function pluralUnit(string $unit): string;
method previous (line 3522) | public function previous($modifier = null);
method previousWeekday (line 3529) | public function previousWeekday();
method previousWeekendDay (line 3536) | public function previousWeekendDay();
method range (line 3545) | public function range($end = null, $interval = null, $unit = null): Ca...
method rawAdd (line 3554) | public function rawAdd(DateInterval $interval): static;
method rawCreateFromFormat (line 3567) | public static function rawCreateFromFormat(string $format, string $tim...
method rawFormat (line 3572) | public function rawFormat(string $format): string;
method rawParse (line 3583) | public static function rawParse(DateTimeInterface|WeekDay|Month|string...
method rawSub (line 3588) | public function rawSub(DateInterval $interval): static;
method resetMacros (line 3593) | public static function resetMacros(): void;
method resetMonthsOverflow (line 3606) | public static function resetMonthsOverflow(): void;
method resetToStringFormat (line 3613) | public static function resetToStringFormat(): void;
method resetYearsOverflow (line 3626) | public static function resetYearsOverflow(): void;
method round (line 3631) | public function round(DateInterval|string|int|float $precision = 1, ca...
method roundUnit (line 3636) | public function roundUnit(string $unit, DateInterval|string|int|float ...
method roundWeek (line 3643) | public function roundWeek(WeekDay|int|null $weekStartsAt = null): static;
method secondsSinceMidnight (line 3650) | public function secondsSinceMidnight(): float;
method secondsUntilEndOfDay (line 3657) | public function secondsUntilEndOfDay(): float;
method serialize (line 3662) | public function serialize(): string;
method serializeUsing (line 3670) | public static function serializeUsing(callable|string|null $format): v...
method set (line 3679) | public function set(Unit|array|string $name, DateTimeZone|Month|string...
method setDate (line 3686) | public function setDate(int $year, int $month, int $day): static;
method setDateFrom (line 3691) | public function setDateFrom(DateTimeInterface|string $date): static;
method setDateTime (line 3696) | public function setDateTime(int $year, int $month, int $day, int $hour...
method setDateTimeFrom (line 3701) | public function setDateTimeFrom(DateTimeInterface|string $date): static;
method setDaysFromStartOfWeek (line 3712) | public function setDaysFromStartOfWeek(int $numberOfDays, WeekDay|int|...
method setFallbackLocale (line 3721) | public static function setFallbackLocale(string $locale): void;
method setHumanDiffOptions (line 3728) | public static function setHumanDiffOptions(int $humanDiffOptions): void;
method setISODate (line 3735) | public function setISODate(int $year, int $week, int $day = 1): static;
method setLocalTranslator (line 3740) | public function setLocalTranslator(TranslatorInterface $translator);
method setLocale (line 3748) | public static function setLocale(string $locale): void;
method setMidDayAt (line 3764) | public static function setMidDayAt($hour);
method setTestNow (line 3788) | public static function setTestNow(mixed $testNow = null): void;
method setTestNowAndTimezone (line 3809) | public static function setTestNowAndTimezone($testNow = null, $timezon...
method setTime (line 3816) | public function setTime(int $hour, int $minute, int $second = 0, int $...
method setTimeFrom (line 3821) | public function setTimeFrom(DateTimeInterface|string $date): static;
method setTimeFromTimeString (line 3826) | public function setTimeFromTimeString(string $time): static;
method setTimestamp (line 3833) | public function setTimestamp(string|int|float $timestamp): static;
method setTimezone (line 3838) | public function setTimezone(DateTimeZone|string|int $timeZone): static;
method setToStringFormat (line 3852) | public static function setToStringFormat(Closure|string|null $format):...
method setTranslator (line 3861) | public static function setTranslator(TranslatorInterface $translator):...
method setUnit (line 3869) | public function setUnit(string $unit, Month|int|float|null $value = nu...
method setUnitNoOverflow (line 3878) | public function setUnitNoOverflow(string $valueUnit, int $value, strin...
method setWeekendDays (line 3903) | public static function setWeekendDays(array $days): void;
method settings (line 3922) | public function settings(array $settings): static;
method shiftTimezone (line 3927) | public function shiftTimezone(DateTimeZone|string $value): static;
method shouldOverflowMonths (line 3934) | public static function shouldOverflowMonths(): bool;
method shouldOverflowYears (line 3941) | public static function shouldOverflowYears(): bool;
method since (line 3949) | public function since($other = null, $syntax = null, $short = false, $...
method singularUnit (line 3954) | public static function singularUnit(string $unit): string;
method sleep (line 3956) | public static function sleep(int|float $seconds): void;
method startOf (line 3968) | public function startOf(Unit|string $unit, mixed ...$params): static;
method startOfCentury (line 3980) | public function startOfCentury();
method startOfDay (line 3992) | public function startOfDay();
method startOfDecade (line 4004) | public function startOfDecade();
method startOfHour (line 4014) | public function startOfHour(): static;
method startOfMillennium (line 4026) | public function startOfMillennium();
method startOfMillisecond (line 4038) | public function startOfMillisecond(): static;
method startOfMinute (line 4048) | public function startOfMinute(): static;
method startOfMonth (line 4060) | public function startOfMonth();
method startOfQuarter (line 4072) | public function startOfQuarter();
method startOfSecond (line 4084) | public function startOfSecond(): static;
method startOfWeek (line 4100) | public function startOfWeek(WeekDay|int|null $weekStartsAt = null): st...
method startOfYear (line 4112) | public function startOfYear();
method sub (line 4127) | #[ReturnTypeWillChange]
method subRealUnit (line 4141) | public function subRealUnit($unit, $value = 1): static;
method subUTCUnit (line 4152) | public function subUTCUnit($unit, $value = 1): static;
method subUnit (line 4157) | public function subUnit(Unit|string $unit, $value = 1, ?bool $overflow...
method subUnitNoOverflow (line 4166) | public function subUnitNoOverflow(string $valueUnit, int $value, strin...
method subtract (line 4179) | public function subtract($unit, $value = 1, ?bool $overflow = null): s...
method timespan (line 4187) | public function timespan($other = null, $timezone = null): string;
method timestamp (line 4194) | public function timestamp(string|int|float $timestamp): static;
method timezone (line 4199) | public function timezone(DateTimeZone|string|int $value): static;
method to (line 4249) | public function to($other = null, $syntax = null, $short = false, $par...
method toArray (line 4259) | public function toArray(): array;
method toAtomString (line 4269) | public function toAtomString(): string;
method toCookieString (line 4279) | public function toCookieString(): string;
method toDate (line 4291) | public function toDate(): DateTime;
method toDateString (line 4301) | public function toDateString(): string;
method toDateTime (line 4311) | public function toDateTime(): DateTime;
method toDateTimeImmutable (line 4321) | public function toDateTimeImmutable(): DateTimeImmutable;
method toDateTimeLocalString (line 4333) | public function toDateTimeLocalString(string $unitPrecision = 'second'...
method toDateTimeString (line 4343) | public function toDateTimeString(string $unitPrecision = 'second'): st...
method toDayDateTimeString (line 4353) | public function toDayDateTimeString(): string;
method toFormattedDateString (line 4363) | public function toFormattedDateString(): string;
method toFormattedDayDateString (line 4373) | public function toFormattedDayDateString(): string;
method toISOString (line 4387) | public function toISOString(bool $keepOffset = false): ?string;
method toImmutable (line 4394) | public function toImmutable();
method toIso8601String (line 4404) | public function toIso8601String(): string;
method toIso8601ZuluString (line 4414) | public function toIso8601ZuluString(string $unitPrecision = 'second'):...
method toJSON (line 4424) | public function toJSON(): ?string;
method toMutable (line 4431) | public function toMutable();
method toNow (line 4461) | public function toNow($syntax = null, $short = false, $parts = 1, $opt...
method toObject (line 4471) | public function toObject(): object;
method toPeriod (line 4480) | public function toPeriod($end = null, $interval = null, $unit = null):...
method toRfc1036String (line 4490) | public function toRfc1036String(): string;
method toRfc1123String (line 4500) | public function toRfc1123String(): string;
method toRfc2822String (line 4510) | public function toRfc2822String(): string;
method toRfc3339String (line 4521) | public function toRfc3339String(bool $extended = false): string;
method toRfc7231String (line 4531) | public function toRfc7231String(): string;
method toRfc822String (line 4541) | public function toRfc822String(): string;
method toRfc850String (line 4551) | public function toRfc850String(): string;
method toRssString (line 4561) | public function toRssString(): string;
method toString (line 4571) | public function toString(): string;
method toTimeString (line 4581) | public function toTimeString(string $unitPrecision = 'second'): string;
method toW3cString (line 4591) | public function toW3cString(): string;
method today (line 4596) | public static function today(DateTimeZone|string|int|null $timezone = ...
method tomorrow (line 4601) | public static function tomorrow(DateTimeZone|string|int|null $timezone...
method translate (line 4614) | public function translate(string $key, array $parameters = [], string|...
method translateNumber (line 4623) | public function translateNumber(int $number): string;
method translateTimeString (line 4641) | public static function translateTimeString(string $timeString, ?string...
method translateTimeStringTo (line 4651) | public function translateTimeStringTo(string $timeString, ?string $to ...
method translateWith (line 4663) | public static function translateWith(TranslatorInterface $translator, ...
method translatedFormat (line 4669) | public function translatedFormat(string $format): string;
method tz (line 4676) | public function tz(DateTimeZone|string|int|null $value = null): static...
method unix (line 4685) | public function unix(): int;
method until (line 4721) | public function until($other = null, $syntax = null, $short = false, $...
method useMonthsOverflow (line 4736) | public static function useMonthsOverflow(bool $monthsOverflow = true):...
method useStrictMode (line 4747) | public static function useStrictMode(bool $strictModeEnabled = true): ...
method useYearsOverflow (line 4762) | public static function useYearsOverflow(bool $yearsOverflow = true): v...
method utc (line 4767) | public function utc(): static;
method utcOffset (line 4772) | public function utcOffset(?int $minuteOffset = null): static|int;
method valueOf (line 4779) | public function valueOf(): float;
method week (line 4792) | public function week($week = null, $dayOfWeek = null, $dayOfYear = null);
method weekYear (line 4805) | public function weekYear($year = null, $dayOfWeek = null, $dayOfYear =...
method weekday (line 4812) | public function weekday(WeekDay|int|null $value = null): static|int;
method weeksInYear (line 4824) | public function weeksInYear($dayOfWeek = null, $dayOfYear = null);
method withTestNow (line 4840) | public static function withTestNow(mixed $testNow, callable $callback)...
method yesterday (line 4845) | public static function yesterday(DateTimeZone|string|int|null $timezon...
FILE: src/Carbon/CarbonInterval.php
class CarbonInterval (line 195) | class CarbonInterval extends DateInterval implements CarbonConverterInte...
method setTimezone (line 308) | public function setTimezone(DateTimeZone|string|int $timezone): static
method shiftTimezone (line 333) | public function shiftTimezone(DateTimeZone|string|int $timezone): static
method getCascadeFactors (line 360) | public static function getCascadeFactors(): array
method getDefaultCascadeFactors (line 365) | protected static function getDefaultCascadeFactors(): array
method setCascadeFactors (line 384) | public static function setCascadeFactors(array $cascadeFactors)
method enableFloatSetters (line 398) | public static function enableFloatSetters(bool $floatSettersEnabled = ...
method __construct (line 421) | public function __construct($years = null, $months = null, $weeks = nu...
method getFactor (line 565) | public static function getFactor($source, $target)
method getFactorWithDefault (line 593) | public static function getFactorWithDefault($source, $target)
method getDaysPerWeek (line 620) | public static function getDaysPerWeek()
method getHoursPerDay (line 630) | public static function getHoursPerDay()
method getMinutesPerHour (line 640) | public static function getMinutesPerHour()
method getSecondsPerMinute (line 650) | public static function getSecondsPerMinute()
method getMillisecondsPerSecond (line 660) | public static function getMillisecondsPerSecond()
method getMicrosecondsPerMillisecond (line 670) | public static function getMicrosecondsPerMillisecond()
method create (line 694) | public static function create($years = null, $months = null, $weeks = ...
method createFromFormat (line 714) | public static function createFromFormat(string $format, ?string $inter...
method original (line 771) | public function original()
method start (line 781) | public function start(): ?CarbonInterface
method end (line 793) | public function end(): ?CarbonInterface
method optimize (line 805) | public function optimize(): static
method copy (line 821) | public function copy(): static
method clone (line 835) | public function clone(): static
method __callStatic (line 851) | public static function __callStatic(string $method, array $parameters)
method __set_state (line 883) | #[ReturnTypeWillChange]
method this (line 898) | protected static function this(): static
method fromString (line 931) | public static function fromString(string $intervalDefinition): static
method parseFromLocale (line 1105) | public static function parseFromLocale(string $interval, ?string $loca...
method diff (line 1118) | public static function diff($start, $end = null, bool $absolute = fals...
method abs (line 1141) | public function abs(bool $absolute = false): static
method absolute (line 1159) | public function absolute(bool $absolute = true): static
method cast (line 1173) | public function cast(string $className): mixed
method instance (line 1190) | public static function instance(DateInterval $interval, array $skip = ...
method make (line 1213) | public static function make($interval, $unit = null, bool $skipCopy = ...
method makeFromString (line 1242) | protected static function makeFromString(string $interval): ?self
method resolveInterval (line 1259) | protected function resolveInterval($interval): ?self
method createFromDateString (line 1277) | public static function createFromDateString(string $datetime): static
method get (line 1311) | public function get(Unit|string $name): int|float|string|null
method __get (line 1349) | public function __get(string $name): int|float|string|null
method set (line 1364) | public function set($name, $value = null): static
method __set (line 1471) | public function __set(string $name, $value)
method weeksAndDays (line 1484) | public function weeksAndDays(int $weeks, int $days): static
method isEmpty (line 1496) | public function isEmpty(): bool
method macro (line 1523) | public static function macro(string $name, ?callable $macro): void
method mixin (line 1561) | public static function mixin($mixin): void
method hasMacro (line 1573) | public static function hasMacro(string $name): bool
method callMacro (line 1586) | protected function callMacro(string $name, array $parameters)
method __call (line 1612) | public function __call(string $method, array $parameters)
method getForHumansInitialVariables (line 1645) | protected function getForHumansInitialVariables($syntax, $short): array
method getForHumansParameters (line 1676) | protected function getForHumansParameters($syntax = null, $short = fal...
method getRoundingMethodFromOptions (line 1755) | protected static function getRoundingMethodFromOptions(int $options): ...
method toArray (line 1777) | public function toArray(): array
method getNonZeroValues (line 1796) | public function getNonZeroValues(): array
method getValuesSequence (line 1807) | public function getValuesSequence(): array
method forHumans (line 1888) | public function forHumans($syntax = null, $short = false, $parts = sel...
method format (line 2089) | public function format(string $format): string
method __toString (line 2109) | public function __toString(): string
method toDateInterval (line 2136) | public function toDateInterval(): DateInterval
method toPeriod (line 2148) | public function toPeriod(...$params): CarbonPeriod
method stepBy (line 2173) | public function stepBy($interval, Unit|string|null $unit = null): Carb...
method invert (line 2202) | public function invert($inverted = null): static
method solveNegativeInterval (line 2209) | protected function solveNegativeInterval(): static
method add (line 2233) | public function add($unit, $value = 1): static
method sub (line 2276) | public function sub($unit, $value = 1): static
method subtract (line 2293) | public function subtract($unit, $value = 1): static
method plus (line 2312) | public function plus(
method minus (line 2342) | public function minus(
method times (line 2373) | public function times($factor): static
method shares (line 2406) | public function shares($divider): static
method copyProperties (line 2411) | protected function copyProperties(self $interval, $ignoreSign = false)...
method multiply (line 2435) | public function multiply($factor): static
method divide (line 2463) | public function divide($divider): static
method getDateIntervalSpec (line 2475) | public static function getDateIntervalSpec(DateInterval $interval, boo...
method spec (line 2527) | public function spec(bool $microseconds = false): string
method compareDateIntervals (line 2540) | public static function compareDateIntervals(DateInterval $first, DateI...
method compare (line 2556) | public function compare(DateInterval $interval): int
method cascade (line 2566) | public function cascade(): static
method hasNegativeValues (line 2571) | public function hasNegativeValues(): bool
method hasPositiveValues (line 2582) | public function hasPositiveValues(): bool
method total (line 2602) | public function total(string $unit): float
method eq (line 2707) | public function eq($interval): bool
method equalTo (line 2719) | public function equalTo($interval): bool
method ne (line 2753) | public function ne($interval): bool
method notEqualTo (line 2765) | public function notEqualTo($interval): bool
method gt (line 2779) | public function gt($interval): bool
method greaterThan (line 2791) | public function greaterThan($interval): bool
method gte (line 2807) | public function gte($interval): bool
method greaterThanOrEqualTo (line 2819) | public function greaterThanOrEqualTo($interval): bool
method lt (line 2833) | public function lt($interval): bool
method lessThan (line 2845) | public function lessThan($interval): bool
method lte (line 2861) | public function lte($interval): bool
method lessThanOrEqualTo (line 2873) | public function lessThanOrEqualTo($interval): bool
method between (line 2899) | public function between($interval1, $interval2, bool $equal = true): bool
method betweenIncluded (line 2921) | public function betweenIncluded($interval1, $interval2): bool
method betweenExcluded (line 2941) | public function betweenExcluded($interval1, $interval2): bool
method isBetween (line 2963) | public function isBetween($interval1, $interval2, bool $equal = true):...
method roundUnit (line 2973) | public function roundUnit(string $unit, DateInterval|string|int|float ...
method floorUnit (line 3012) | public function floorUnit(string $unit, $precision = 1): static
method ceilUnit (line 3027) | public function ceilUnit(string $unit, $precision = 1): static
method round (line 3042) | public function round($precision = 1, string $function = 'round'): static
method floor (line 3054) | public function floor(DateInterval|string|float|int $precision = 1): s...
method ceil (line 3066) | public function ceil(DateInterval|string|float|int $precision = 1): st...
method __unserialize (line 3071) | public function __unserialize(array $data): void
method withOriginal (line 3147) | private static function withOriginal(mixed $interval, mixed $original)...
method standardizeUnit (line 3156) | private static function standardizeUnit(string $unit): string
method getFlipCascadeFactors (line 3163) | private static function getFlipCascadeFactors(): array
method castIntervalToClass (line 3185) | private static function castIntervalToClass(DateInterval $interval, st...
method buildInstance (line 3222) | private static function buildInstance(
method buildSerializationString (line 3246) | private static function buildSerializationString(
method copyStep (line 3290) | private static function copyStep(self $from, self $to): void
method copyNegativeUnits (line 3295) | private static function copyNegativeUnits(DateInterval $from, DateInte...
method invertCascade (line 3306) | private function invertCascade(array $values): static
method doCascade (line 3313) | private function doCascade(bool $deep): static
method needsDeclension (line 3380) | private function needsDeclension(string $mode, int $index, int $parts)...
method checkIntegerValue (line 3388) | private function checkIntegerValue(string $name, mixed $value): void
method assertSafeForInteger (line 3416) | private function assertSafeForInteger(string $name, mixed $value): void
method handleDecimalPart (line 3423) | private function handleDecimalPart(string $unit, mixed $value, mixed $...
method getInnerValues (line 3462) | private function getInnerValues(): array
method checkStartAndEnd (line 3467) | private function checkStartAndEnd(): void
method setSetting (line 3482) | private function setSetting(string $setting, mixed $value): self
method incrementUnit (line 3517) | private static function incrementUnit(DateInterval $instance, string $...
method setIntervalUnit (line 3536) | private static function setIntervalUnit(DateInterval $instance, string...
FILE: src/Carbon/CarbonPeriod.php
class CarbonPeriod (line 184) | class CarbonPeriod extends DatePeriodBase implements Countable, JsonSeri...
method getIterator (line 329) | public function getIterator(): Generator
method make (line 346) | public static function make(mixed $var): ?static
method instance (line 358) | public static function instance(mixed $period): static
method create (line 396) | public static function create(...$params): static
method createFromArray (line 404) | public static function createFromArray(array $params): static
method createFromIso (line 412) | public static function createFromIso(string $iso, ?int $options = null...
method createFromISO8601String (line 424) | public static function createFromISO8601String(string $iso, ?int $opti...
method intervalHasTime (line 432) | protected static function intervalHasTime(DateInterval $interval): bool
method isIso8601 (line 443) | protected static function isIso8601(mixed $var): bool
method parseIso8601 (line 462) | protected static function parseIso8601(string $iso): array
method addMissingParts (line 493) | protected static function addMissingParts(string $source, string $targ...
method makeInterval (line 502) | private static function makeInterval(mixed $input): ?CarbonInterval
method makeTimezone (line 511) | private static function makeTimezone(mixed $input): ?CarbonTimeZone
method macro (line 539) | public static function macro(string $name, ?callable $macro): void
method mixin (line 574) | public static function mixin(object|string $mixin): void
method hasMacro (line 582) | public static function hasMacro(string $name): bool
method __callStatic (line 590) | public static function __callStatic(string $method, array $parameters)...
method __construct (line 608) | public function __construct(...$arguments)
method copy (line 742) | public function copy(): static
method copyIfImmutable (line 751) | protected function copyIfImmutable(): static
method getGetter (line 759) | protected function getGetter(string $name): ?callable
method get (line 787) | public function get(string $name)
method __get (line 805) | public function __get(string $name)
method __isset (line 817) | public function __isset(string $name): bool
method clone (line 829) | public function clone()
method setDateClass (line 841) | public function setDateClass(string $dateClass)
method getDateClass (line 864) | public function getDateClass(): string
method setDateInterval (line 879) | public function setDateInterval(mixed $interval, Unit|string|null $uni...
method resetDateInterval (line 913) | public function resetDateInterval(): static
method invertDateInterval (line 926) | public function invertDateInterval(): static
method setDates (line 939) | public function setDates(mixed $start, mixed $end): static
method setOptions (line 951) | public function setOptions(?int $options): static
method getOptions (line 964) | public function getOptions(): int
method toggleOptions (line 979) | public function toggleOptions(int $options, ?bool $state = null): static
method excludeStartDate (line 997) | public function excludeStartDate(bool $state = true): static
method excludeEndDate (line 1005) | public function excludeEndDate(bool $state = true): static
method getDateInterval (line 1013) | public function getDateInterval(): CarbonInterval
method getStartDate (line 1023) | public function getStartDate(?string $rounding = null): CarbonInterface
method getEndDate (line 1035) | public function getEndDate(?string $rounding = null): ?CarbonInterface
method getRecurrences (line 1049) | #[ReturnTypeWillChange]
method isStartExcluded (line 1058) | public function isStartExcluded(): bool
method isEndExcluded (line 1066) | public function isEndExcluded(): bool
method isStartIncluded (line 1074) | public function isStartIncluded(): bool
method isEndIncluded (line 1082) | public function isEndIncluded(): bool
method getIncludedStartDate (line 1090) | public function getIncludedStartDate(): CarbonInterface
method getIncludedEndDate (line 1105) | public function getIncludedEndDate(): CarbonInterface
method addFilter (line 1125) | public function addFilter(callable|string $callback, ?string $name = n...
method prependFilter (line 1142) | public function prependFilter(callable|string $callback, ?string $name...
method removeFilter (line 1157) | public function removeFilter(callable|string $filter): static
method hasFilter (line 1177) | public function hasFilter(callable|string $filter): bool
method getFilters (line 1193) | public function getFilters(): array
method setFilters (line 1201) | public function setFilters(array $filters): static
method resetFilters (line 1216) | public function resetFilters(): static
method setRecurrences (line 1239) | public function setRecurrences(int|float|null $recurrences): static
method setStartDate (line 1272) | public function setStartDate(mixed $date, ?bool $inclusive = null): st...
method setEndDate (line 1298) | public function setEndDate(mixed $date, ?bool $inclusive = null): static
method valid (line 1327) | public function valid(): bool
method key (line 1335) | public function key(): ?int
method current (line 1345) | public function current(): ?CarbonInterface
method next (line 1357) | public function next(): void
method rewind (line 1381) | public function rewind(): void
method skip (line 1412) | public function skip(int $count = 1): bool
method toIso8601String (line 1424) | public function toIso8601String(): string
method toString (line 1448) | public function toString(): string
method spec (line 1490) | public function spec(): string
method cast (line 1502) | public function cast(string $className): object
method toDatePeriod (line 1528) | public function toDatePeriod(): DatePeriod
method isUnfilteredAndEndLess (line 1540) | public function isUnfilteredAndEndLess(): bool
method toArray (line 1571) | public function toArray(): array
method count (line 1593) | public function count(): int
method first (line 1601) | public function first(): ?CarbonInterface
method last (line 1619) | public function last(): ?CarbonInterface
method __toString (line 1629) | public function __toString(): string
method __call (line 1644) | public function __call(string $method, array $parameters): mixed
method setTimezone (line 1797) | public function setTimezone(DateTimeZone|string|int $timezone): static
method shiftTimezone (line 1817) | public function shiftTimezone(DateTimeZone|string|int $timezone): static
method calculateEnd (line 1841) | public function calculateEnd(?string $rounding = null): CarbonInterface
method getEndFromRecurrences (line 1860) | private function getEndFromRecurrences(): ?CarbonInterface
method iterateUntilEnd (line 1888) | private function iterateUntilEnd(): ?CarbonInterface
method overlaps (line 1913) | public function overlaps(mixed $rangeOrRangeStart, mixed $rangeEnd = n...
method forEach (line 1937) | public function forEach(callable $callback): void
method map (line 1955) | public function map(callable $callback): Generator
method eq (line 1968) | public function eq(mixed $period): bool
method equalTo (line 1977) | public function equalTo(mixed $period): bool
method ne (line 1998) | public function ne(mixed $period): bool
method notEqualTo (line 2007) | public function notEqualTo(mixed $period): bool
method startsBefore (line 2016) | public function startsBefore(mixed $date = null): bool
method startsBeforeOrAt (line 2025) | public function startsBeforeOrAt(mixed $date = null): bool
method startsAfter (line 2034) | public function startsAfter(mixed $date = null): bool
method startsAfterOrAt (line 2043) | public function startsAfterOrAt(mixed $date = null): bool
method startsAt (line 2052) | public function startsAt(mixed $date = null): bool
method endsBefore (line 2061) | public function endsBefore(mixed $date = null): bool
method endsBeforeOrAt (line 2070) | public function endsBeforeOrAt(mixed $date = null): bool
method endsAfter (line 2079) | public function endsAfter(mixed $date = null): bool
method endsAfterOrAt (line 2088) | public function endsAfterOrAt(mixed $date = null): bool
method endsAt (line 2097) | public function endsAt(mixed $date = null): bool
method isStarted (line 2106) | public function isStarted(): bool
method isEnded (line 2115) | public function isEnded(): bool
method isInProgress (line 2124) | public function isInProgress(): bool
method roundUnit (line 2132) | public function roundUnit(
method floorUnit (line 2150) | public function floorUnit(string $unit, DateInterval|float|int|string|...
method ceilUnit (line 2158) | public function ceilUnit(string $unit, DateInterval|float|int|string|n...
method round (line 2166) | public function round(
method floor (line 2179) | public function floor(DateInterval|float|int|string|null $precision = ...
method ceil (line 2187) | public function ceil(DateInterval|float|int|string|null $precision = n...
method jsonSerialize (line 2199) | public function jsonSerialize(): array
method contains (line 2207) | public function contains(mixed $date = null): bool
method follows (line 2220) | public function follows(mixed $period, mixed ...$arguments): bool
method isFollowedBy (line 2232) | public function isFollowedBy(mixed $period, mixed ...$arguments): bool
method isConsecutiveWith (line 2245) | public function isConsecutiveWith(mixed $period, mixed ...$arguments):...
method __debugInfo (line 2250) | public function __debugInfo(): array
method __unserialize (line 2266) | public function __unserialize(array $data): void
method updateInternalState (line 2350) | protected function updateInternalState(): void
method createFilterTuple (line 2366) | protected function createFilterTuple(array $parameters): array
method isCarbonPredicateMethod (line 2381) | protected function isCarbonPredicateMethod(callable|string $callable):...
method filterRecurrences (line 2392) | protected function filterRecurrences(CarbonInterface $current, int $ke...
method filterEndDate (line 2406) | protected function filterEndDate(CarbonInterface $current): bool|callable
method endIteration (line 2424) | protected function endIteration(): callable
method handleChangedParameters (line 2432) | protected function handleChangedParameters(): void
method validateCurrentDate (line 2451) | protected function validateCurrentDate(): bool|callable
method checkFilters (line 2466) | protected function checkFilters(): bool|callable
method prepareForReturn (line 2492) | protected function prepareForReturn(CarbonInterface $date)
method incrementCurrentDateUntilValid (line 2508) | protected function incrementCurrentDateUntilValid(): void
method callMacro (line 2526) | protected function callMacro(string $name, array $parameters): mixed
method resolveCarbon (line 2547) | protected function resolveCarbon($date = null)
method resolveCarbonPeriod (line 2555) | protected function resolveCarbonPeriod(mixed $period, mixed ...$argume...
method orderCouple (line 2566) | private function orderCouple($first, $second): array
method makeDateTime (line 2571) | private function makeDateTime($value): ?DateTimeInterface
method isInfiniteDate (line 2599) | private function isInfiniteDate($date): bool
method rawDate (line 2604) | private function rawDate($date): ?DateTimeInterface
method setDefaultParameters (line 2625) | private static function setDefaultParameters(array &$parameters, array...
method setFromAssociativeArray (line 2634) | private function setFromAssociativeArray(array $parameters): void
method configureTimezone (line 2661) | private function configureTimezone(DateTimeZone $timezone, array $sort...
method initializeSerialization (line 2676) | private function initializeSerialization(array $values): void
FILE: src/Carbon/CarbonPeriodImmutable.php
class CarbonPeriodImmutable (line 16) | class CarbonPeriodImmutable extends CarbonPeriod
method copyIfImmutable (line 34) | protected function copyIfImmutable(): static
FILE: src/Carbon/CarbonTimeZone.php
class CarbonTimeZone (line 25) | class CarbonTimeZone extends DateTimeZone
method __construct (line 31) | public function __construct(string|int|float $timezone)
method parseNumericTimezone (line 38) | protected static function parseNumericTimezone(string|int|float $timez...
method getDateTimeZoneNameFromMixed (line 50) | protected static function getDateTimeZoneNameFromMixed(string|int|floa...
method cast (line 70) | public function cast(string $className): mixed
method instance (line 93) | public static function instance(
method getAbbreviatedName (line 129) | public function getAbbreviatedName(bool $dst = false): string
method getAbbr (line 166) | public function getAbbr(bool $dst = false): string
method toOffsetName (line 174) | public function toOffsetName(?DateTimeInterface $date = null): string
method toOffsetTimeZone (line 184) | public function toOffsetTimeZone(?DateTimeInterface $date = null): static
method toRegionName (line 195) | public function toRegionName(?DateTimeInterface $date = null, int $isD...
method toRegionTimeZone (line 233) | public function toRegionTimeZone(?DateTimeInterface $date = null): ?self
method __toString (line 253) | public function __toString()
method getType (line 265) | public function getType(): int
method create (line 277) | public static function create($object = null)
method createFromHourOffset (line 289) | public static function createFromHourOffset(float $hourOffset)
method createFromMinuteOffset (line 301) | public static function createFromMinuteOffset(float $minuteOffset)
method getOffsetNameFromMinuteOffset (line 313) | public static function getOffsetNameFromMinuteOffset(float $minutes): ...
method resolveCarbon (line 324) | private function resolveCarbon(?DateTimeInterface $date): DateTimeInte...
FILE: src/Carbon/Cli/Invoker.php
class Invoker (line 16) | class Invoker
method runWithCli (line 20) | protected function runWithCli(string $className, array $parameters): bool
method __invoke (line 27) | public function __invoke(...$parameters): bool
FILE: src/Carbon/Constants/DiffOptions.php
type DiffOptions (line 16) | interface DiffOptions
FILE: src/Carbon/Constants/Format.php
type Format (line 16) | interface Format
FILE: src/Carbon/Constants/TranslationOptions.php
type TranslationOptions (line 16) | interface TranslationOptions
FILE: src/Carbon/Constants/UnitValue.php
type UnitValue (line 16) | interface UnitValue
FILE: src/Carbon/Exceptions/BadComparisonUnitException.php
class BadComparisonUnitException (line 18) | class BadComparisonUnitException extends UnitException
method __construct (line 34) | public function __construct($unit, $code = 0, ?Throwable $previous = n...
method getUnit (line 46) | public function getUnit(): string
FILE: src/Carbon/Exceptions/BadFluentConstructorException.php
class BadFluentConstructorException (line 19) | class BadFluentConstructorException extends BaseBadMethodCallException i...
method __construct (line 35) | public function __construct($method, $code = 0, ?Throwable $previous =...
method getMethod (line 47) | public function getMethod(): string
FILE: src/Carbon/Exceptions/BadFluentSetterException.php
class BadFluentSetterException (line 19) | class BadFluentSetterException extends BaseBadMethodCallException implem...
method __construct (line 35) | public function __construct($setter, $code = 0, ?Throwable $previous =...
method getSetter (line 47) | public function getSetter(): string
FILE: src/Carbon/Exceptions/BadMethodCallException.php
type BadMethodCallException (line 16) | interface BadMethodCallException extends Exception
FILE: src/Carbon/Exceptions/EndLessPeriodException.php
class EndLessPeriodException (line 18) | final class EndLessPeriodException extends BaseRuntimeException implemen...
FILE: src/Carbon/Exceptions/Exception.php
type Exception (line 16) | interface Exception
FILE: src/Carbon/Exceptions/ImmutableException.php
class ImmutableException (line 19) | class ImmutableException extends BaseRuntimeException implements Runtime...
method __construct (line 35) | public function __construct($value, $code = 0, ?Throwable $previous = ...
method getValue (line 46) | public function getValue(): string
FILE: src/Carbon/Exceptions/InvalidArgumentException.php
type InvalidArgumentException (line 16) | interface InvalidArgumentException extends Exception
FILE: src/Carbon/Exceptions/InvalidCastException.php
class InvalidCastException (line 18) | class InvalidCastException extends BaseInvalidArgumentException implemen...
FILE: src/Carbon/Exceptions/InvalidDateException.php
class InvalidDateException (line 19) | class InvalidDateException extends BaseInvalidArgumentException implemen...
method __construct (line 43) | public function __construct($field, $value, $code = 0, ?Throwable $pre...
method getField (line 55) | public function getField()
method getValue (line 65) | public function getValue()
FILE: src/Carbon/Exceptions/InvalidFormatException.php
class InvalidFormatException (line 18) | class InvalidFormatException extends BaseInvalidArgumentException implem...
FILE: src/Carbon/Exceptions/InvalidIntervalException.php
class InvalidIntervalException (line 18) | class InvalidIntervalException extends BaseInvalidArgumentException impl...
FILE: src/Carbon/Exceptions/InvalidPeriodDateException.php
class InvalidPeriodDateException (line 18) | class InvalidPeriodDateException extends BaseInvalidArgumentException im...
FILE: src/Carbon/Exceptions/InvalidPeriodParameterException.php
class InvalidPeriodParameterException (line 18) | class InvalidPeriodParameterException extends BaseInvalidArgumentExcepti...
FILE: src/Carbon/Exceptions/InvalidTimeZoneException.php
class InvalidTimeZoneException (line 18) | class InvalidTimeZoneException extends BaseInvalidArgumentException impl...
FILE: src/Carbon/Exceptions/InvalidTypeException.php
class InvalidTypeException (line 18) | class InvalidTypeException extends BaseInvalidArgumentException implemen...
FILE: src/Carbon/Exceptions/NotACarbonClassException.php
class NotACarbonClassException (line 20) | class NotACarbonClassException extends BaseInvalidArgumentException impl...
method __construct (line 36) | public function __construct($className, $code = 0, ?Throwable $previou...
method getClassName (line 52) | public function getClassName(): string
FILE: src/Carbon/Exceptions/NotAPeriodException.php
class NotAPeriodException (line 18) | class NotAPeriodException extends BaseInvalidArgumentException implement...
FILE: src/Carbon/Exceptions/NotLocaleAwareException.php
class NotLocaleAwareException (line 19) | class NotLocaleAwareException extends BaseInvalidArgumentException imple...
method __construct (line 28) | public function __construct($object, $code = 0, ?Throwable $previous =...
FILE: src/Carbon/Exceptions/OutOfRangeException.php
class OutOfRangeException (line 22) | class OutOfRangeException extends BaseInvalidArgumentException implement...
method __construct (line 62) | public function __construct($unit, $min, $max, $value, $code = 0, ?Thr...
method getMax (line 75) | public function getMax()
method getMin (line 83) | public function getMin()
method getUnit (line 91) | public function getUnit()
method getValue (line 99) | public function getValue()
FILE: src/Carbon/Exceptions/ParseErrorException.php
class ParseErrorException (line 19) | class ParseErrorException extends BaseInvalidArgumentException implement...
method __construct (line 50) | public function __construct($expected, $actual, $help = '', $code = 0,...
method getExpected (line 66) | public function getExpected(): string
method getActual (line 76) | public function getActual(): string
method getHelp (line 86) | public function getHelp(): string
FILE: src/Carbon/Exceptions/RuntimeException.php
type RuntimeException (line 16) | interface RuntimeException extends Exception
FILE: src/Carbon/Exceptions/UnitException.php
class UnitException (line 18) | class UnitException extends BaseInvalidArgumentException implements Inva...
FILE: src/Carbon/Exceptions/UnitNotConfiguredException.php
class UnitNotConfiguredException (line 18) | class UnitNotConfiguredException extends UnitException
method __construct (line 34) | public function __construct($unit, $code = 0, ?Throwable $previous = n...
method getUnit (line 46) | public function getUnit(): string
FILE: src/Carbon/Exceptions/UnknownGetterException.php
class UnknownGetterException (line 19) | class UnknownGetterException extends BaseInvalidArgumentException implem...
method __construct (line 35) | public function __construct($getter, $code = 0, ?Throwable $previous =...
method getGetter (line 47) | public function getGetter(): string
FILE: src/Carbon/Exceptions/UnknownMethodException.php
class UnknownMethodException (line 19) | class UnknownMethodException extends BaseBadMethodCallException implemen...
method __construct (line 35) | public function __construct($method, $code = 0, ?Throwable $previous =...
method getMethod (line 47) | public function getMethod(): string
FILE: src/Carbon/Exceptions/UnknownSetterException.php
class UnknownSetterException (line 19) | class UnknownSetterException extends BaseInvalidArgumentException implem...
method __construct (line 35) | public function __construct($setter, $code = 0, ?Throwable $previous =...
method getSetter (line 47) | public function getSetter(): string
FILE: src/Carbon/Exceptions/UnknownUnitException.php
class UnknownUnitException (line 18) | class UnknownUnitException extends UnitException
method __construct (line 34) | public function __construct($unit, $code = 0, ?Throwable $previous = n...
method getUnit (line 46) | public function getUnit(): string
FILE: src/Carbon/Exceptions/UnreachableException.php
class UnreachableException (line 18) | class UnreachableException extends BaseRuntimeException implements Runti...
FILE: src/Carbon/Exceptions/UnsupportedUnitException.php
class UnsupportedUnitException (line 21) | class UnsupportedUnitException extends UnitException
method __construct (line 23) | public function __construct(string $unit, int $code = 0, ?Exception $p...
FILE: src/Carbon/Factory.php
class Factory (line 137) | class Factory
method __construct (line 235) | public function __construct(array $settings = [], ?string $className =...
method getClassName (line 244) | public function getClassName(): string
method setClassName (line 249) | public function setClassName(string $className): self
method className (line 256) | public function className(?string $className = null): self|string
method getSettings (line 261) | public function getSettings(): array
method setSettings (line 266) | public function setSettings(array $settings): self
method settings (line 273) | public function settings(?array $settings = null): self|array
method mergeSettings (line 278) | public function mergeSettings(array $settings): self
method setHumanDiffOptions (line 285) | public function setHumanDiffOptions(int $humanDiffOptions): void
method enableHumanDiffOption (line 292) | public function enableHumanDiffOption($humanDiffOption): void
method disableHumanDiffOption (line 297) | public function disableHumanDiffOption(int $humanDiffOption): void
method getHumanDiffOptions (line 302) | public function getHumanDiffOptions(): int
method macro (line 326) | public function macro(string $name, ?callable $macro): void
method resetMacros (line 339) | public function resetMacros(): void
method genericMacro (line 355) | public function genericMacro(callable $macro, int $priority = 0): void
method hasMacro (line 374) | public function hasMacro(string $name): bool
method getMacro (line 382) | public function getMacro(string $name): ?callable
method setTranslator (line 390) | public function setTranslator(TranslatorInterface $translator): void
method getTranslator (line 398) | public function getTranslator(): TranslatorInterface
method resetToStringFormat (line 408) | public function resetToStringFormat(): void
method setToStringFormat (line 416) | public function setToStringFormat(string|Closure|null $format): void
method serializeUsing (line 426) | public function serializeUsing(string|callable|null $format): void
method useStrictMode (line 436) | public function useStrictMode(bool $strictModeEnabled = true): void
method isStrictModeEnabled (line 447) | public function isStrictModeEnabled(): bool
method useMonthsOverflow (line 455) | public function useMonthsOverflow(bool $monthsOverflow = true): void
method resetMonthsOverflow (line 465) | public function resetMonthsOverflow(): void
method shouldOverflowMonths (line 473) | public function shouldOverflowMonths(): bool
method useYearsOverflow (line 481) | public function useYearsOverflow(bool $yearsOverflow = true): void
method resetYearsOverflow (line 491) | public function resetYearsOverflow(): void
method shouldOverflowYears (line 499) | public function shouldOverflowYears(): bool
method getWeekendDays (line 509) | public function getWeekendDays(): array
method setWeekendDays (line 517) | public function setWeekendDays(array $days): void
method hasFormat (line 531) | public function hasFormat(string $date, string $format): bool
method hasFormatWithModifiers (line 549) | public function hasFormatWithModifiers(string $date, string $format): ...
method setTestNow (line 576) | public function setTestNow(mixed $testNow = null): void
method setTestNowAndTimezone (line 603) | public function setTestNowAndTimezone(mixed $testNow = null, $timezone...
method withTestNow (line 642) | public function withTestNow(mixed $testNow, callable $callback): mixed
method getTestNow (line 662) | public function getTestNow(): Closure|CarbonInterface|null
method handleTestNowClosure (line 675) | public function handleTestNowClosure(
method hasTestNow (line 713) | public function hasTestNow(): bool
method withTimeZone (line 718) | public function withTimeZone(DateTimeZone|string|int|null $timezone): ...
method __call (line 726) | public function __call(string $name, array $arguments): mixed
method getMockedTestNow (line 777) | protected function getMockedTestNow(DateTimeZone|string|int|null $time...
method matchFormatPattern (line 808) | private function matchFormatPattern(string $date, string $format, arra...
method setDefaultTimezone (line 826) | private function setDefaultTimezone(string $timezone, ?DateTimeInterfa...
FILE: src/Carbon/FactoryImmutable.php
class FactoryImmutable (line 132) | class FactoryImmutable extends Factory implements ClockInterface
method getDefaultInstance (line 143) | public static function getDefaultInstance(): self
method getInstance (line 151) | public static function getInstance(): Factory
method setCurrentClock (line 159) | public static function setCurrentClock(ClockInterface|Factory|DateTime...
method getCurrentClock (line 171) | public static function getCurrentClock(): ?WrapperClock
method now (line 179) | public function now(DateTimeZone|string|int|null $timezone = null): Ca...
method sleep (line 184) | public function sleep(int|float $seconds): void
FILE: src/Carbon/Language.php
class Language (line 18) | class Language implements JsonSerializable
method __construct (line 38) | public function __construct(string $id)
method all (line 60) | public static function all(): array
method regions (line 73) | public static function regions(): array
method getNames (line 83) | public function getNames(): array
method getId (line 96) | public function getId(): string
method getCode (line 104) | public function getCode(): string
method getVariant (line 112) | public function getVariant(): ?string
method getVariantName (line 120) | public function getVariantName(): ?string
method getRegion (line 136) | public function getRegion(): ?string
method getRegionName (line 147) | public function getRegionName(): ?string
method getFullIsoName (line 155) | public function getFullIsoName(): string
method setIsoName (line 165) | public function setIsoName(string $isoName): static
method getFullNativeName (line 175) | public function getFullNativeName(): string
method setNativeName (line 185) | public function setNativeName(string $nativeName): static
method getIsoName (line 195) | public function getIsoName(): string
method getNativeName (line 205) | public function getNativeName(): string
method getIsoDescription (line 215) | public function getIsoDescription(): string
method getNativeDescription (line 226) | public function getNativeDescription(): string
method getFullIsoDescription (line 237) | public function getFullIsoDescription(): string
method getFullNativeDescription (line 248) | public function getFullNativeDescription(): string
method __toString (line 259) | public function __toString(): string
method jsonSerialize (line 267) | public function jsonSerialize(): string
FILE: src/Carbon/Laravel/ServiceProvider.php
class ServiceProvider (line 27) | class ServiceProvider extends \Illuminate\Support\ServiceProvider
method setAppGetter (line 38) | public function setAppGetter(?callable $appGetter): void
method setLocaleGetter (line 43) | public function setLocaleGetter(?callable $localeGetter): void
method setFallbackLocaleGetter (line 48) | public function setFallbackLocaleGetter(?callable $fallbackLocaleGette...
method boot (line 53) | public function boot()
method updateLocale (line 72) | public function updateLocale()
method updateFallbackLocale (line 99) | public function updateFallbackLocale()
method register (line 126) | public function register()
method getLocale (line 131) | protected function getLocale()
method getFallbackLocale (line 145) | protected function getFallbackLocale()
method getApp (line 158) | protected function getApp()
method getGlobalApp (line 167) | protected function getGlobalApp(...$args)
method isEventDispatcher (line 172) | protected function isEventDispatcher($instance)
FILE: src/Carbon/MessageFormatter/MessageFormatterMapper.php
class MessageFormatterMapper (line 28) | final class MessageFormatterMapper extends LazyMessageFormatter
method __construct (line 37) | public function __construct(?MessageFormatterInterface $formatter = null)
method transformLocale (line 42) | protected function transformLocale(?string $locale): ?string
FILE: src/Carbon/Month.php
method int (line 34) | public static function int(self|int|null $value): ?int
method fromNumber (line 39) | public static function fromNumber(int $number): self
method fromName (line 46) | public static function fromName(string $name, ?string $locale = null): self
method ofTheYear (line 64) | public function ofTheYear(CarbonImmutable|int|null $now = null): CarbonI...
method locale (line 75) | public function locale(string $locale, ?CarbonImmutable $now = null): Ca...
FILE: src/Carbon/PHPStan/MacroExtension.php
class MacroExtension (line 35) | final class MacroExtension implements MethodsClassReflectionExtension
method __construct (line 53) | public function __construct(
method hasMethod (line 64) | public function hasMethod(ClassReflection $classReflection, string $me...
method getMethod (line 82) | public function getMethod(ClassReflection $classReflection, string $me...
FILE: src/Carbon/PHPStan/MacroMethodReflection.php
class MacroMethodReflection (line 24) | class MacroMethodReflection implements MethodReflection
method __construct (line 34) | public function __construct(
method getDeclaringClass (line 52) | public function getDeclaringClass(): ClassReflection
method isStatic (line 57) | public function isStatic(): bool
method isPrivate (line 62) | public function isPrivate(): bool
method isPublic (line 67) | public function isPublic(): bool
method getDocComment (line 72) | public function getDocComment(): ?string
method getName (line 77) | public function getName(): string
method getPrototype (line 82) | public function getPrototype(): \PHPStan\Reflection\ClassMemberReflection
method getVariants (line 87) | public function getVariants(): array
method isDeprecated (line 92) | public function isDeprecated(): TrinaryLogic
method getDeprecatedDescription (line 100) | public function getDeprecatedDescription(): ?string
method isFinal (line 105) | public function isFinal(): TrinaryLogic
method isInternal (line 110) | public function isInternal(): TrinaryLogic
method getThrowType (line 115) | public function getThrowType(): ?Type
method hasSideEffects (line 120) | public function hasSideEffects(): TrinaryLogic
FILE: src/Carbon/Traits/Boundaries.php
type Boundaries (line 38) | trait Boundaries
method startOfDay (line 50) | public function startOfDay()
method endOfDay (line 65) | public function endOfDay()
method startOfMonth (line 80) | public function startOfMonth()
method endOfMonth (line 95) | public function endOfMonth()
method startOfQuarter (line 110) | public function startOfQuarter()
method endOfQuarter (line 127) | public function endOfQuarter()
method startOfYear (line 142) | public function startOfYear()
method endOfYear (line 157) | public function endOfYear()
method startOfDecade (line 172) | public function startOfDecade()
method endOfDecade (line 189) | public function endOfDecade()
method startOfCentury (line 206) | public function startOfCentury()
method endOfCentury (line 223) | public function endOfCentury()
method startOfMillennium (line 240) | public function startOfMillennium()
method endOfMillennium (line 257) | public function endOfMillennium()
method startOfWeek (line 278) | public function startOfWeek(WeekDay|int|null $weekStartsAt = null): st...
method endOfWeek (line 302) | public function endOfWeek(WeekDay|int|null $weekEndsAt = null): static
method startOfHour (line 320) | public function startOfHour(): static
method endOfHour (line 333) | public function endOfHour(): static
method startOfMinute (line 346) | public function startOfMinute(): static
method endOfMinute (line 359) | public function endOfMinute(): static
method startOfSecond (line 374) | public function startOfSecond(): static
method endOfSecond (line 389) | public function endOfSecond(): static
method startOfMillisecond (line 404) | public function startOfMillisecond(): static
method endOfMillisecond (line 421) | public function endOfMillisecond(): static
method startOf (line 438) | public function startOf(Unit|string $unit, mixed ...$params): static
method endOf (line 459) | public function endOf(Unit|string $unit, mixed ...$params): static
FILE: src/Carbon/Traits/Cast.php
type Cast (line 24) | trait Cast
method cast (line 35) | public function cast(string $className): mixed
FILE: src/Carbon/Traits/Comparison.php
type Comparison (line 44) | trait Comparison
method eq (line 62) | public function eq(DateTimeInterface|string $date): bool
method equalTo (line 77) | public function equalTo(DateTimeInterface|string $date): bool
method ne (line 94) | public function ne(DateTimeInterface|string $date): bool
method notEqualTo (line 109) | public function notEqualTo(DateTimeInterface|string $date): bool
method gt (line 126) | public function gt(DateTimeInterface|string $date): bool
method greaterThan (line 141) | public function greaterThan(DateTimeInterface|string $date): bool
method isAfter (line 158) | public function isAfter(DateTimeInterface|string $date): bool
method gte (line 175) | public function gte(DateTimeInterface|string $date): bool
method greaterThanOrEqualTo (line 190) | public function greaterThanOrEqualTo(DateTimeInterface|string $date): ...
method lt (line 207) | public function lt(DateTimeInterface|string $date): bool
method lessThan (line 222) | public function lessThan(DateTimeInterface|string $date): bool
method isBefore (line 239) | public function isBefore(DateTimeInterface|string $date): bool
method lte (line 256) | public function lte(DateTimeInterface|string $date): bool
method lessThanOrEqualTo (line 271) | public function lessThanOrEqualTo(DateTimeInterface|string $date): bool
method between (line 293) | public function between(DateTimeInterface|string $date1, DateTimeInter...
method betweenIncluded (line 319) | public function betweenIncluded(DateTimeInterface|string $date1, DateT...
method betweenExcluded (line 334) | public function betweenExcluded(DateTimeInterface|string $date1, DateT...
method isBetween (line 352) | public function isBetween(DateTimeInterface|string $date1, DateTimeInt...
method isWeekday (line 366) | public function isWeekday(): bool
method isWeekend (line 380) | public function isWeekend(): bool
method isYesterday (line 398) | public function isYesterday(): bool
method isToday (line 414) | public function isToday(): bool
method isTomorrow (line 428) | public function isTomorrow(): bool
method isFuture (line 444) | public function isFuture(): bool
method isPast (line 458) | public function isPast(): bool
method isNowOrFuture (line 473) | public function isNowOrFuture(): bool
method isNowOrPast (line 488) | public function isNowOrPast(): bool
method isLeapYear (line 502) | public function isLeapYear(): bool
method isLongYear (line 523) | public function isLongYear(): bool
method isLongIsoYear (line 542) | public function isLongIsoYear(): bool
method isSameAs (line 559) | public function isSameAs(string $format, DateTimeInterface|string $dat...
method isSameUnit (line 580) | public function isSameUnit(string $unit, DateTimeInterface|string $dat...
method isCurrentUnit (line 641) | public function isCurrentUnit(string $unit): bool
method isSameQuarter (line 662) | public function isSameQuarter(DateTimeInterface|string $date, bool $of...
method isSameMonth (line 685) | public function isSameMonth(DateTimeInterface|string $date, bool $ofSa...
method isDayOfWeek (line 705) | public function isDayOfWeek($dayOfWeek): bool
method isBirthday (line 729) | public function isBirthday(DateTimeInterface|string|null $date = null)...
method isLastOfMonth (line 746) | public function isLastOfMonth(): bool
method isStartOfUnit (line 760) | public function isStartOfUnit(
method isEndOfUnit (line 792) | public function isEndOfUnit(
method isStartOfMillisecond (line 818) | public function isStartOfMillisecond(
method isEndOfMillisecond (line 827) | public function isEndOfMillisecond(
method isStartOfSecond (line 836) | public function isStartOfSecond(
method isEndOfSecond (line 845) | public function isEndOfSecond(
method isStartOfMinute (line 854) | public function isStartOfMinute(
method isEndOfMinute (line 863) | public function isEndOfMinute(
method isStartOfHour (line 872) | public function isStartOfHour(
method isEndOfHour (line 881) | public function isEndOfHour(
method isStartOfDay (line 905) | public function isStartOfDay(
method isEndOfDay (line 966) | public function isEndOfDay(
method isStartOfWeek (line 1014) | public function isStartOfWeek(
method isEndOfWeek (line 1030) | public function isEndOfWeek(
method isStartOfMonth (line 1040) | public function isStartOfMonth(
method isEndOfMonth (line 1049) | public function isEndOfMonth(
method isStartOfQuarter (line 1058) | public function isStartOfQuarter(
method isEndOfQuarter (line 1067) | public function isEndOfQuarter(
method isStartOfYear (line 1076) | public function isStartOfYear(
method isEndOfYear (line 1085) | public function isEndOfYear(
method isStartOfDecade (line 1094) | public function isStartOfDecade(
method isEndOfDecade (line 1103) | public function isEndOfDecade(
method isStartOfCentury (line 1112) | public function isStartOfCentury(
method isEndOfCentury (line 1121) | public function isEndOfCentury(
method isStartOfMillennium (line 1130) | public function isStartOfMillennium(
method isEndOfMillennium (line 1139) | public function isEndOfMillennium(
method isMidnight (line 1155) | public function isMidnight(): bool
method isMidday (line 1171) | public function isMidday(): bool
method hasFormat (line 1186) | public static function hasFormat(string $date, string $format): bool
method hasFormatWithModifiers (line 1205) | public static function hasFormatWithModifiers(?string $date, string $f...
method canBeCreatedFromFormat (line 1220) | public static function canBeCreatedFromFormat(?string $date, string $f...
method is (line 1261) | public function is(WeekDay|Month|string $tester): bool
method isStartOfTime (line 1347) | public function isStartOfTime(): bool
method isEndOfTime (line 1357) | public function isEndOfTime(): bool
FILE: src/Carbon/Traits/Converter.php
type Converter (line 38) | trait Converter
method format (line 47) | public function format(string $format): string
method rawFormat (line 67) | public function rawFormat(string $format): string
method __toString (line 80) | public function __toString(): string
method toDateString (line 103) | public function toDateString(): string
method toFormattedDateString (line 116) | public function toFormattedDateString(): string
method toFormattedDayDateString (line 129) | public function toFormattedDayDateString(): string
method toTimeString (line 142) | public function toTimeString(string $unitPrecision = 'second'): string
method toDateTimeString (line 155) | public function toDateTimeString(string $unitPrecision = 'second'): st...
method getTimeFormatByPrecision (line 165) | public static function getTimeFormatByPrecision(string $unitPrecision)...
method toDateTimeLocalString (line 186) | public function toDateTimeLocalString(string $unitPrecision = 'second'...
method toDayDateTimeString (line 199) | public function toDayDateTimeString(): string
method toAtomString (line 212) | public function toAtomString(): string
method toCookieString (line 225) | public function toCookieString(): string
method toIso8601String (line 238) | public function toIso8601String(): string
method toRfc822String (line 251) | public function toRfc822String(): string
method toIso8601ZuluString (line 264) | public function toIso8601ZuluString(string $unitPrecision = 'second'):...
method toRfc850String (line 279) | public function toRfc850String(): string
method toRfc1036String (line 292) | public function toRfc1036String(): string
method toRfc1123String (line 305) | public function toRfc1123String(): string
method toRfc2822String (line 318) | public function toRfc2822String(): string
method toRfc3339String (line 332) | public function toRfc3339String(bool $extended = false): string
method toRssString (line 345) | public function toRssString(): string
method toW3cString (line 358) | public function toW3cString(): string
method toRfc7231String (line 371) | public function toRfc7231String(): string
method toArray (line 386) | public function toArray(): array
method toObject (line 412) | public function toObject(): object
method toString (line 425) | public function toString(): string
method toISOString (line 442) | public function toISOString(bool $keepOffset = false): ?string
method toJSON (line 463) | public function toJSON(): ?string
method toDateTime (line 476) | public function toDateTime(): DateTime
method toDateTimeImmutable (line 490) | public function toDateTimeImmutable(): DateTimeImmutable
method toDate (line 506) | public function toDate(): DateTime
method toPeriod (line 518) | public function toPeriod($end = null, $interval = null, $unit = null):...
method range (line 552) | public function range($end = null, $interval = null, $unit = null): Ca...
FILE: src/Carbon/Traits/Creator.php
type Creator (line 45) | trait Creator
method __construct (line 63) | public function __construct(
method constructTimezoneFromDateTime (line 113) | private function constructTimezoneFromDateTime(
method __clone (line 135) | public function __clone(): void
method instance (line 143) | public static function instance(DateTimeInterface $date): static
method rawParse (line 174) | public static function rawParse(
method parse (line 207) | public static function parse(
method parseFromLocale (line 234) | public static function parseFromLocale(
method now (line 245) | public static function now(DateTimeZone|string|int|null $timezone = nu...
method today (line 253) | public static function today(DateTimeZone|string|int|null $timezone = ...
method tomorrow (line 261) | public static function tomorrow(DateTimeZone|string|int|null $timezone...
method yesterday (line 269) | public static function yesterday(DateTimeZone|string|int|null $timezon...
method assertBetween (line 274) | private static function assertBetween($unit, $value, $min, $max): void
method createNowInstance (line 281) | private static function createNowInstance($timezone)
method create (line 322) | public static function create($year = 0, $month = 1, $day = 1, $hour =...
method createSafe (line 408) | public static function createSafe($year = null, $month = null, $day = ...
method createStrict (line 455) | public static function createStrict(?int $year = 0, ?int $month = 1, ?...
method createFromDate (line 481) | public static function createFromDate($year = null, $month = null, $da...
method createMidnightDate (line 498) | public static function createMidnightDate($year = null, $month = null,...
method createFromTime (line 515) | public static function createFromTime($hour = 0, $minute = 0, $second ...
method createFromTimeString (line 525) | public static function createFromTimeString(string $time, DateTimeZone...
method createFromFormatAndTimezone (line 530) | private static function createFromFormatAndTimezone(
method getOffsetTimezone (line 546) | private static function getOffsetTimezone(int $offset): string
method rawCreateFromFormat (line 566) | public static function rawCreateFromFormat(string $format, string $tim...
method createFromFormat (line 642) | #[ReturnTypeWillChange]
method createFromIsoFormat (line 684) | public static function createFromIsoFormat(
method createFromLocaleFormat (line 828) | public static function createFromLocaleFormat(string $format, string $...
method createFromLocaleIsoFormat (line 858) | public static function createFromLocaleIsoFormat(string $format, strin...
method make (line 877) | public static function make($var, DateTimeZone|string|null $timezone =...
method setLastErrors (line 906) | private static function setLastErrors($lastErrors): void
method getLastErrors (line 914) | public static function getLastErrors(): array|false
method monthToInt (line 919) | private static function monthToInt(mixed $value, string $unit = 'month...
FILE: src/Carbon/Traits/Date.php
type Date (line 863) | trait Date
method safeCreateDateTimeZone (line 953) | protected static function safeCreateDateTimeZone(
method getTimezone (line 965) | public function getTimezone(): CarbonTimeZone
method getRangesByUnit (line 973) | protected static function getRangesByUnit(int $daysInMonth = 31): array
method copy (line 996) | public function copy()
method clone (line 1008) | public function clone()
method avoidMutation (line 1021) | public function avoidMutation(): static
method nowWithSameTz (line 1035) | public function nowWithSameTz(): static
method carbonize (line 1050) | public function carbonize($date = null)
method __get (line 1074) | public function __get(string $name): mixed
method get (line 1086) | public function get(Unit|string $name): mixed
method __isset (line 1359) | public function __isset($name)
method __set (line 1380) | public function __set($name, $value)
method set (line 1398) | public function set(Unit|array|string $name, DateTimeZone|Month|string...
method getTranslatedDayName (line 1564) | public function getTranslatedDayName(
method getTranslatedShortDayName (line 1577) | public function getTranslatedShortDayName(?string $context = null): st...
method getTranslatedMinDayName (line 1587) | public function getTranslatedMinDayName(?string $context = null): string
method getTranslatedMonthName (line 1599) | public function getTranslatedMonthName(
method getTranslatedShortMonthName (line 1612) | public function getTranslatedShortMonthName(?string $context = null): ...
method dayOfYear (line 1630) | public function dayOfYear(?int $value = null): static|int
method weekday (line 1642) | public function weekday(WeekDay|int|null $value = null): static|int
method isoWeekday (line 1659) | public function isoWeekday(WeekDay|int|null $value = null): static|int
method getDaysFromStartOfWeek (line 1674) | public function getDaysFromStartOfWeek(WeekDay|int|null $weekStartsAt ...
method setDaysFromStartOfWeek (line 1690) | public function setDaysFromStartOfWeek(int $numberOfDays, WeekDay|int|...
method setUnitNoOverflow (line 1702) | public function setUnitNoOverflow(string $valueUnit, int $value, strin...
method addUnitNoOverflow (line 1731) | public function addUnitNoOverflow(string $valueUnit, int $value, strin...
method subUnitNoOverflow (line 1743) | public function subUnitNoOverflow(string $valueUnit, int $value, strin...
method utcOffset (line 1751) | public function utcOffset(?int $minuteOffset = null): static|int
method setDate (line 1765) | public function setDate(int $year, int $month, int $day): static
method setISODate (line 1775) | public function setISODate(int $year, int $week, int $day = 1): static
method setDateTime (line 1783) | public function setDateTime(
method setTime (line 1800) | public function setTime(int $hour, int $minute, int $second = 0, int $...
method setTimestamp (line 1810) | public function setTimestamp(float|int|string $timestamp): static
method setTimeFromTimeString (line 1820) | public function setTimeFromTimeString(string $time): static
method timezone (line 1832) | public function timezone(DateTimeZone|string|int $value): static
method tz (line 1842) | public function tz(DateTimeZone|string|int|null $value = null): static...
method setTimezone (line 1854) | public function setTimezone(DateTimeZone|string|int $timeZone): static
method shiftTimezone (line 1862) | public function shiftTimezone(DateTimeZone|string $value): static
method utc (line 1874) | public function utc(): static
method setDateFrom (line 1882) | public function setDateFrom(DateTimeInterface|string $date): static
method setTimeFrom (line 1892) | public function setTimeFrom(DateTimeInterface|string $date): static
method setDateTimeFrom (line 1902) | public function setDateTimeFrom(DateTimeInterface|string $date): static
method getDays (line 1912) | public static function getDays(): array
method getWeekStartsAt (line 1926) | public static function getWeekStartsAt(?string $locale = null): int
method getWeekEndsAt (line 1941) | public static function getWeekEndsAt(?string $locale = null): int
method getWeekendDays (line 1949) | public static function getWeekendDays(): array
method setWeekendDays (line 1977) | public static function setWeekendDays(array $days): void
method hasRelativeKeywords (line 1987) | public static function hasRelativeKeywords(?string $time): bool
method getIsoFormats (line 2010) | public function getIsoFormats(?string $locale = null): array
method getCalendarFormats (line 2031) | public function getCalendarFormats(?string $locale = null): array
method getIsoUnits (line 2046) | public static function getIsoUnits(): array
method getPaddedUnit (line 2159) | public function getPaddedUnit($unit, $length = 2, $padString = '0', $p...
method ordinal (line 2167) | public function ordinal(string $key, ?string $period = null): string
method meridiem (line 2183) | public function meridiem(bool $isLower = false): string
method getAltNumber (line 2221) | public function getAltNumber(string $key): string
method isoFormat (line 2231) | public function isoFormat(string $format, ?string $originalFormat = nu...
method getFormatsToIsoReplacements (line 2322) | public static function getFormatsToIsoReplacements(): array
method translatedFormat (line 2374) | public function translatedFormat(string $format): string
method getOffsetString (line 2455) | public function getOffsetString(string $separator = ':'): string
method __callStatic (line 2474) | public static function __callStatic(string $method, array $parameters)...
method setUnit (line 2501) | public function setUnit(string $unit, Month|int|float|null $value = nu...
method singularUnit (line 2544) | public static function singularUnit(string $unit): string
method pluralUnit (line 2558) | public static function pluralUnit(string $unit): string
method sleep (line 2569) | public static function sleep(int|float $seconds): void
method __call (line 2588) | public function __call(string $method, array $parameters): mixed
method resolveCarbon (line 2606) | protected function resolveCarbon(DateTimeInterface|string|null $date):...
method weekRotate (line 2619) | protected static function weekRotate(int $day, int $rotation): int
method executeCallable (line 2624) | protected function executeCallable(callable $macro, ...$parameters)
method executeCallableWithContext (line 2635) | protected function executeCallableWithContext(callable $macro, ...$par...
method getAllGenericMacros (line 2642) | protected function getAllGenericMacros(): Generator
method getGenericMacros (line 2648) | protected static function getGenericMacros(): Generator
method executeStaticCallable (line 2657) | protected static function executeStaticCallable(callable $macro, ...$p...
method getTranslatedFormByRegExp (line 2670) | protected function getTranslatedFormByRegExp($baseKey, $keySuffix, $co...
method callGetOrSetMethod (line 2690) | private function callGetOrSetMethod(string $method, array $parameters)...
method callGetOrSet (line 2708) | private function callGetOrSet(string $name, mixed $value): mixed
method getUTCUnit (line 2721) | private function getUTCUnit(string $unit): ?string
method callDiffAlias (line 2734) | private function callDiffAlias(string $method, array $parameters): mixed
method callHumanDiffAlias (line 2772) | private function callHumanDiffAlias(string $method, array $parameters)...
method callIsMethod (line 2811) | private function callIsMethod(string $unit, array $parameters): ?bool
method callComparatorMethod (line 2836) | private function callComparatorMethod(string $unit, array $parameters)...
method callModifierMethod (line 2873) | private function callModifierMethod(string $unit, array $parameters): ...
method callPeriodMethod (line 2911) | private function callPeriodMethod(string $method, array $parameters): ...
method callMacroMethod (line 2930) | private function callMacroMethod(string $method, array $parameters): m...
method floorZeroPad (line 2955) | private static function floorZeroPad(int|float $value, int $length): s...
method mutateIfMutable (line 2967) | private function mutateIfMutable(CarbonInterface $date): CarbonInterface
FILE: src/Carbon/Traits/DeprecatedPeriodProperties.php
type DeprecatedPeriodProperties (line 19) | trait DeprecatedPeriodProperties
FILE: src/Carbon/Traits/Difference.php
type Difference (line 36) | trait Difference
method diffAsDateInterval (line 48) | public function diffAsDateInterval($date = null, bool $absolute = fals...
method diffAsCarbonInterval (line 73) | public function diffAsCarbonInterval($date = null, bool $absolute = fa...
method diff (line 91) | public function diff($date = null, bool $absolute = false, array $skip...
method diffInUnit (line 106) | public function diffInUnit(Unit|string $unit, $date = null, bool $abso...
method diffInYears (line 127) | public function diffInYears($date = null, bool $absolute = false, bool...
method diffInQuarters (line 170) | public function diffInQuarters($date = null, bool $absolute = false, b...
method diffInMonths (line 184) | public function diffInMonths($date = null, bool $absolute = false, boo...
method diffInWeeks (line 240) | public function diffInWeeks($date = null, bool $absolute = false, bool...
method diffInDays (line 254) | public function diffInDays($date = null, bool $absolute = false, bool ...
method diffInDaysFiltered (line 289) | public function diffInDaysFiltered(Closure $callback, $date = null, bo...
method diffInHoursFiltered (line 303) | public function diffInHoursFiltered(Closure $callback, $date = null, b...
method diffFiltered (line 318) | public function diffFiltered(CarbonInterval $ci, Closure $callback, $d...
method diffInWeekdays (line 344) | public function diffInWeekdays($date = null, bool $absolute = false): int
method diffInWeekendDays (line 361) | public function diffInWeekendDays($date = null, bool $absolute = false...
method diffInHours (line 378) | public function diffInHours($date = null, bool $absolute = false): float
method diffInMinutes (line 391) | public function diffInMinutes($date = null, bool $absolute = false): f...
method diffInSeconds (line 404) | public function diffInSeconds($date = null, bool $absolute = false): f...
method diffInMicroseconds (line 417) | public function diffInMicroseconds($date = null, bool $absolute = fals...
method diffInMilliseconds (line 435) | public function diffInMilliseconds($date = null, bool $absolute = fals...
method secondsSinceMidnight (line 445) | public function secondsSinceMidnight(): float
method secondsUntilEndOfDay (line 455) | public function secondsUntilEndOfDay(): float
method diffForHumans (line 510) | public function diffForHumans($other = null, $syntax = null, $short = ...
method from (line 572) | public function from($other = null, $syntax = null, $short = false, $p...
method since (line 583) | public function since($other = null, $syntax = null, $short = false, $...
method to (line 636) | public function to($other = null, $syntax = null, $short = false, $par...
method until (line 679) | public function until($other = null, $syntax = null, $short = false, $...
method fromNow (line 712) | public function fromNow($syntax = null, $short = false, $parts = 1, $o...
method toNow (line 751) | public function toNow($syntax = null, $short = false, $parts = 1, $opt...
method ago (line 784) | public function ago($syntax = null, $short = false, $parts = 1, $optio...
method timespan (line 801) | public function timespan($other = null, $timezone = null): string
method calendar (line 825) | public function calendar($referenceTime = null, array $formats = [])
method getIntervalDayDiff (line 851) | private function getIntervalDayDiff(DateInterval $interval): int
FILE: src/Carbon/Traits/IntervalRounding.php
type IntervalRounding (line 23) | trait IntervalRounding
method callRoundMethod (line 25) | protected function callRoundMethod(string $method, array $parameters):...
method roundWith (line 40) | protected function roundWith(DateInterval|string|float|int $precision,...
FILE: src/Carbon/Traits/IntervalStep.php
type IntervalStep (line 24) | trait IntervalStep
method getStep (line 38) | public function getStep(): ?Closure
method setStep (line 50) | public function setStep(?Closure $step): void
method convertDate (line 65) | public function convertDate(DateTimeInterface $dateTime, bool $negated...
method resolveCarbon (line 86) | private function resolveCarbon(DateTimeInterface $dateTime): Carbon|Ca...
FILE: src/Carbon/Traits/LocalFactory.php
type LocalFactory (line 24) | trait LocalFactory
method getClock (line 31) | public function getClock(): ?WrapperClock
method initLocalFactory (line 36) | private function initLocalFactory(): void
method transmitFactory (line 51) | private function transmitFactory(Closure $action): mixed
method getFactory (line 63) | private function getFactory(): Factory
FILE: src/Carbon/Traits/Localization.php
type Localization (line 32) | trait Localization
method hasLocalTranslator (line 44) | public function hasLocalTranslator(): bool
method getLocalTranslator (line 52) | public function getLocalTranslator(): TranslatorInterface
method setLocalTranslator (line 60) | public function setLocalTranslator(TranslatorInterface $translator): self
method getTranslationMessageWith (line 77) | public static function getTranslationMessageWith($translator, string $...
method getTranslationMessage (line 105) | public function getTranslationMessage(string $key, ?string $locale = n...
method translateWith (line 120) | public static function translateWith(TranslatorInterface $translator, ...
method translate (line 148) | public function translate(
method translateNumber (line 171) | public function translateNumber(int $number): string
method translateTimeString (line 230) | public static function translateTimeString(
method translateTimeStringTo (line 337) | public function translateTimeStringTo(string $timeString, ?string $to ...
method locale (line 350) | public function locale(?string $locale = null, string ...$fallbackLoca...
method getLocale (line 382) | public static function getLocale(): string
method setLocale (line 393) | public static function setLocale(string $locale): void
method setFallbackLocale (line 405) | public static function setFallbackLocale(string $locale): void
method getFallbackLocale (line 442) | public static function getFallbackLocale(): ?string
method executeWithLocale (line 462) | public static function executeWithLocale(string $locale, callable $fun...
method localeHasShortUnits (line 486) | public static function localeHasShortUnits(string $locale): bool
method localeHasDiffSyntax (line 507) | public static function localeHasDiffSyntax(string $locale): bool
method localeHasDiffOneDayWords (line 538) | public static function localeHasDiffOneDayWords(string $locale): bool
method localeHasDiffTwoDayWords (line 556) | public static function localeHasDiffTwoDayWords(string $locale): bool
method localeHasPeriodSyntax (line 573) | public static function localeHasPeriodSyntax($locale)
method getAvailableLocales (line 590) | public static function getAvailableLocales(): array
method getAvailableLocalesInfo (line 605) | public static function getAvailableLocalesInfo(): array
method getTranslatorLocale (line 622) | protected function getTranslatorLocale($translator = null): ?string
method getLocaleAwareTranslator (line 640) | protected static function getLocaleAwareTranslator($translator = null)
method getFromCatalogue (line 659) | private static function getFromCatalogue($translator, $catalogue, stri...
method cleanWordFromTranslationString (line 673) | private static function cleanWordFromTranslationString($word)
method translateWordsByKeys (line 695) | private static function translateWordsByKeys($keys, $messages, $key): ...
method getTranslationArray (line 723) | private static function getTranslationArray($translation, $length, $ti...
method replaceOrdinalWords (line 741) | private static function replaceOrdinalWords(string $timeString, array ...
FILE: src/Carbon/Traits/Macro.php
type Macro (line 23) | trait Macro
method macro (line 46) | public static function macro(string $name, ?callable $macro): void
method resetMacros (line 54) | public static function resetMacros(): void
method genericMacro (line 67) | public static function genericMacro(callable $macro, int $priority = 0...
method hasMacro (line 79) | public static function hasMacro(string $name): bool
method getMacro (line 87) | public static function getMacro(string $name): ?callable
method hasLocalMacro (line 95) | public function hasLocalMacro(string $name): bool
method getLocalMacro (line 105) | public function getLocalMacro(string $name): ?callable
FILE: src/Carbon/Traits/MagicParameter.php
type MagicParameter (line 21) | trait MagicParameter
method getMagicParameter (line 23) | private function getMagicParameter(array $parameters, int $index, stri...
FILE: src/Carbon/Traits/Mixin.php
type Mixin (line 32) | trait Mixin
method mixin (line 66) | public static function mixin(object|string $mixin): void
method loadMixinClass (line 76) | private static function loadMixinClass(object|string $mixin): void
method cannotBeAMixinMethod (line 95) | private static function cannotBeAMixinMethod(ReflectionMethod $method)...
method loadMixinTrait (line 125) | private static function loadMixinTrait(string $trait): void
method getAnonymousClassCodeForTrait (line 194) | private static function getAnonymousClassCodeForTrait(string $trait): ...
method getMixableMethods (line 199) | private static function getMixableMethods(self $context): Generator
method bindMacroContext (line 213) | protected static function bindMacroContext(?self $context, callable $c...
method context (line 227) | protected static function context(): ?static
method this (line 235) | protected static function this(): static
FILE: src/Carbon/Traits/Modifiers.php
type Modifiers (line 25) | trait Modifiers
method getMidDayAt (line 39) | public static function getMidDayAt()
method setMidDayAt (line 58) | public static function setMidDayAt($hour)
method midDay (line 68) | public function midDay()
method next (line 83) | public function next($modifier = null)
method nextOrPreviousDay (line 102) | private function nextOrPreviousDay($weekday = true, $forward = true)
method nextWeekday (line 120) | public function nextWeekday()
method previousWeekday (line 130) | public function previousWeekday()
method nextWeekendDay (line 140) | public function nextWeekendDay()
method previousWeekendDay (line 150) | public function previousWeekendDay()
method previous (line 165) | public function previous($modifier = null)
method firstOfMonth (line 186) | public function firstOfMonth($dayOfWeek = null)
method lastOfMonth (line 207) | public function lastOfMonth($dayOfWeek = null)
method nthOfMonth (line 229) | public function nthOfMonth($nth, $dayOfWeek)
method firstOfQuarter (line 248) | public function firstOfQuarter($dayOfWeek = null)
method lastOfQuarter (line 263) | public function lastOfQuarter($dayOfWeek = null)
method nthOfQuarter (line 279) | public function nthOfQuarter($nth, $dayOfWeek)
method firstOfYear (line 299) | public function firstOfYear($dayOfWeek = null)
method lastOfYear (line 314) | public function lastOfYear($dayOfWeek = null)
method nthOfYear (line 330) | public function nthOfYear($nth, $dayOfWeek)
method average (line 345) | public function average($date = null)
method closest (line 358) | public function closest($date1, $date2)
method farthest (line 371) | public function farthest($date1, $date2)
method min (line 383) | public function min($date = null)
method minimum (line 399) | public function minimum($date = null)
method max (line 411) | public function max($date = null)
method maximum (line 427) | public function maximum($date = null)
method modify (line 439) | #[ReturnTypeWillChange]
method change (line 460) | public function change($modifier)
FILE: src/Carbon/Traits/Mutability.php
type Mutability (line 24) | trait Mutability
method isMutable (line 31) | public static function isMutable(): bool
method isImmutable (line 39) | public static function isImmutable(): bool
method toMutable (line 47) | public function toMutable(): Carbon
method toImmutable (line 55) | public function toImmutable(): CarbonImmutable
FILE: src/Carbon/Traits/ObjectInitialisation.php
type ObjectInitialisation (line 16) | trait ObjectInitialisation
FILE: src/Carbon/Traits/Options.php
type Options (line 29) | trait Options
method settings (line 105) | public function settings(array $settings): static
method getSettings (line 143) | public function getSettings(): array
method __debugInfo (line 174) | public function __debugInfo(): array
method isLocalStrictModeEnabled (line 200) | protected function isLocalStrictModeEnabled(): bool
method addExtraDebugInfos (line 206) | protected function addExtraDebugInfos(array &$infos): void
FILE: src/Carbon/Traits/Rounding.php
type Rounding (line 31) | trait Rounding
method roundUnit (line 38) | public function roundUnit(
method floorUnit (line 145) | public function floorUnit(string $unit, DateInterval|string|float|int ...
method ceilUnit (line 153) | public function ceilUnit(string $unit, DateInterval|string|float|int $...
method round (line 161) | public function round(DateInterval|string|float|int $precision = 1, ca...
method floor (line 169) | public function floor(DateInterval|string|float|int $precision = 1): s...
method ceil (line 177) | public function ceil(DateInterval|string|float|int $precision = 1): st...
method roundWeek (line 187) | public function roundWeek(WeekDay|int|null $weekStartsAt = null): static
method floorWeek (line 200) | public function floorWeek(WeekDay|int|null $weekStartsAt = null): static
method ceilWeek (line 210) | public function ceilWeek(WeekDay|int|null $weekStartsAt = null): static
FILE: src/Carbon/Traits/Serialization.php
type Serialization (line 39) | trait Serialization
method serialize (line 68) | public function serialize(): string
method fromSerialized (line 91) | public static function fromSerialized($value, array $options = []): st...
method __set_state (line 109) | #[ReturnTypeWillChange]
method __serialize (line 129) | public function __serialize(): array
method __unserialize (line 168) | public function __unserialize(array $data): void
method jsonSerialize (line 196) | public function jsonSerialize(): mixed
method serializeUsing (line 217) | public static function serializeUsing(string|callable|null $format): void
method cleanupDumpProperties (line 229) | public function cleanupDumpProperties(): self
method dumpTimezone (line 245) | private function dumpTimezone(mixed $timezone): mixed
FILE: src/Carbon/Traits/StaticLocalization.php
type StaticLocalization (line 22) | trait StaticLocalization
method setHumanDiffOptions (line 29) | public static function setHumanDiffOptions(int $humanDiffOptions): void
method enableHumanDiffOption (line 39) | public static function enableHumanDiffOption(int $humanDiffOption): void
method disableHumanDiffOption (line 49) | public static function disableHumanDiffOption(int $humanDiffOption): void
method getHumanDiffOptions (line 57) | public static function getHumanDiffOptions(): int
method setTranslator (line 69) | public static function setTranslator(TranslatorInterface $translator):...
method getTranslator (line 77) | public static function getTranslator(): TranslatorInterface
FILE: src/Carbon/Traits/StaticOptions.php
type StaticOptions (line 21) | trait StaticOptions
method useStrictMode (line 61) | public static function useStrictMode(bool $strictModeEnabled = true): ...
method isStrictModeEnabled (line 72) | public static function isStrictModeEnabled(): bool
method useMonthsOverflow (line 90) | public static function useMonthsOverflow(bool $monthsOverflow = true):...
method resetMonthsOverflow (line 106) | public static function resetMonthsOverflow(): void
method shouldOverflowMonths (line 116) | public static function shouldOverflowMonths(): bool
method useYearsOverflow (line 134) | public static function useYearsOverflow(bool $yearsOverflow = true): void
method resetYearsOverflow (line 150) | public static function resetYearsOverflow(): void
method shouldOverflowYears (line 160) | public static function shouldOverflowYears(): bool
FILE: src/Carbon/Traits/Test.php
type Test (line 25) | trait Test
method setTestNow (line 53) | public static function setTestNow(mixed $testNow = null): void
method setTestNowAndTimezone (line 77) | public static function setTestNowAndTimezone($testNow = null, $timezon...
method withTestNow (line 96) | public static function withTestNow(mixed $testNow, callable $callback)...
method getTestNow (line 107) | public static function getTestNow(): Closure|CarbonInterface|null
method hasTestNow (line 118) | public static function hasTestNow(): bool
method getMockedTestNow (line 126) | protected static function getMockedTestNow(DateTimeZone|string|int|nul...
method mockConstructorParameters (line 139) | private function mockConstructorParameters(&$time, ?CarbonTimeZone $ti...
method getMockedTestNowClone (line 172) | private static function getMockedTestNowClone($timezone): CarbonInterf...
method nowFromClock (line 179) | private function nowFromClock(?CarbonTimeZone $timezone): ?DateTimeImm...
FILE: src/Carbon/Traits/Timestamp.php
type Timestamp (line 21) | trait Timestamp
method createFromTimestamp (line 28) | #[\ReturnTypeWillChange]
method createFromTimestampUTC (line 43) | public static function createFromTimestampUTC(float|int|string $timest...
method createFromTimestampMsUTC (line 63) | public static function createFromTimestampMsUTC($timestamp): static
method createFromTimestampMs (line 83) | public static function createFromTimestampMs(
method timestamp (line 97) | public function timestamp(float|int|string $timestamp): static
method getPreciseTimestamp (line 120) | public function getPreciseTimestamp($precision = 6): float
method valueOf (line 130) | public function valueOf(): float
method getTimestampMs (line 140) | public function getTimestampMs(): int
method unix (line 152) | public function unix(): int
method getIntegerAndDecimalParts (line 169) | private static function getIntegerAndDecimalParts($numbers, $decimals ...
FILE: src/Carbon/Traits/ToStringFormat.php
type ToStringFormat (line 24) | trait ToStringFormat
method resetToStringFormat (line 31) | public static function resetToStringFormat(): void
method setToStringFormat (line 48) | public static function setToStringFormat(string|Closure|null $format):...
FILE: src/Carbon/Traits/Units.php
type Units (line 34) | trait Units
method addRealUnit (line 47) | public function addRealUnit(string $unit, $value = 1): static
method addUTCUnit (line 61) | public function addUTCUnit(string $unit, $value = 1): static
method subRealUnit (line 180) | public function subRealUnit($unit, $value = 1): static
method subUTCUnit (line 194) | public function subUTCUnit($unit, $value = 1): static
method isModifiableUnit (line 206) | public static function isModifiableUnit($unit): bool
method rawAdd (line 233) | public function rawAdd(DateInterval $interval): static
method add (line 251) | #[ReturnTypeWillChange]
method addUnit (line 289) | public function addUnit(Unit|string $unit, $value = 1, ?bool $overflow...
method subUnit (line 377) | public function subUnit(Unit|string $unit, $value = 1, ?bool $overflow...
method rawSub (line 385) | public function rawSub(DateInterval $interval): static
method sub (line 403) | #[ReturnTypeWillChange]
method subtract (line 449) | public function subtract($unit, $value = 1, ?bool $overflow = null): s...
method rawAddUnit (line 458) | private static function rawAddUnit(self $date, string $unit, int|float...
FILE: src/Carbon/Traits/Week.php
type Week (line 41) | trait Week
method isoWeekYear (line 54) | public function isoWeekYear($year = null, $dayOfWeek = null, $dayOfYea...
method weekYear (line 74) | public function weekYear($year = null, $dayOfWeek = null, $dayOfYear =...
method isoWeeksInYear (line 134) | public function isoWeeksInYear($dayOfWeek = null, $dayOfYear = null)
method weeksInYear (line 152) | public function weeksInYear($dayOfWeek = null, $dayOfYear = null)
method week (line 182) | public function week($week = null, $dayOfWeek = null, $dayOfYear = null)
method isoWeek (line 215) | public function isoWeek($week = null, $dayOfWeek = null, $dayOfYear = ...
FILE: src/Carbon/Translator.php
class Translator (line 31) | class Translator extends LazyTranslator
FILE: src/Carbon/TranslatorImmutable.php
class TranslatorImmutable (line 20) | class TranslatorImmutable extends Translator
method __construct (line 24) | public function __construct($locale, ?MessageFormatterInterface $forma...
method setDirectories (line 33) | public function setDirectories(array $directories): static
method setLocale (line 40) | public function setLocale($locale): void
method setMessages (line 50) | public function setMessages(string $locale, array $messages): static
method setTranslations (line 60) | public function setTranslations(array $messages): static
method setConfigCacheFactory (line 70) | public function setConfigCacheFactory(ConfigCacheFactoryInterface $con...
method resetMessages (line 77) | public function resetMessages(?string $locale = null): bool
method setFallbackLocales (line 87) | public function setFallbackLocales(array $locales): void
method disallowMutation (line 94) | private function disallowMutation($method)
FILE: src/Carbon/TranslatorStrongTypeInterface.php
type TranslatorStrongTypeInterface (line 21) | interface TranslatorStrongTypeInterface
method getFromCatalogue (line 23) | public function getFromCatalogue(MessageCatalogueInterface $catalogue,...
FILE: src/Carbon/Unit.php
method toName (line 32) | public static function toName(self|string $unit): string
method toNameIfUnit (line 38) | public static function toNameIfUnit(mixed $unit): mixed
method fromName (line 43) | public static function fromName(string $name, ?string $locale = null): self
method singular (line 76) | public function singular(?string $locale = null): string
method plural (line 88) | public function plural(?string $locale = null): string
method interval (line 100) | public function interval(int|float $value = 1): CarbonInterval
method locale (line 105) | public function locale(string $locale): CarbonInterval
method toPeriod (line 110) | public function toPeriod(...$params): CarbonPeriod
method stepBy (line 115) | public function stepBy(mixed $interval, Unit|string|null $unit = null): ...
FILE: src/Carbon/WeekDay.php
method int (line 29) | public static function int(self|int|null $value): ?int
method fromNumber (line 34) | public static function fromNumber(int $number): self
method fromName (line 41) | public static function fromName(string $name, ?string $locale = null): self
method next (line 59) | public function next(?CarbonImmutable $now = null): CarbonImmutable
method locale (line 64) | public function locale(string $locale, ?CarbonImmutable $now = null): Ca...
FILE: src/Carbon/WrapperClock.php
class WrapperClock (line 24) | final class WrapperClock implements ClockInterface
method __construct (line 26) | public function __construct(
method unwrap (line 31) | public function unwrap(): PsrClockInterface|Factory|DateTimeInterface
method getFactory (line 36) | public function getFactory(): Factory
method nowRaw (line 62) | private function nowRaw(): DateTimeInterface
method now (line 75) | public function now(): DateTimeImmutable
method nowAs (line 91) | public function nowAs(string $class, DateTimeZone|string|int|null $tim...
method nowAsCarbon (line 99) | public function nowAsCarbon(DateTimeZone|string|int|null $timezone = n...
method dateAsCarbon (line 108) | private function dateAsCarbon(DateTimeInterface $date, DateTimeZone|st...
method sleep (line 115) | public function sleep(float|int $seconds): void
method withTimeZone (line 140) | public function withTimeZone(DateTimeZone|string $timezone): static
method addSeconds (line 161) | private function addSeconds(DateTimeInterface $date, float|int $second...
FILE: tests/AbstractTestCase.php
class AbstractTestCase (line 39) | abstract class AbstractTestCase extends TestCase
method getTimestamp (line 53) | protected function getTimestamp(): int
method setUp (line 58) | protected function setUp(): void
method tearDown (line 84) | protected function tearDown(): void
method assertCarbon (line 107) | public function assertCarbon(CarbonInterface $d, $year, $month, $day, ...
method assertCarbonTime (line 144) | public function assertCarbonTime(CarbonInterface $d, $hour = null, $mi...
method assertInstanceOfCarbon (line 176) | public function assertInstanceOfCarbon($d): void
method assertCarbonInterval (line 181) | public function assertCarbonInterval(CarbonInterval $ci, $years, $mont...
method assertInstanceOfCarbonInterval (line 227) | public function assertInstanceOfCarbonInterval($d): void
method wrapWithTestNow (line 232) | public function wrapWithTestNow(Closure $func, ?CarbonInterface $dt = ...
method wrapWithNonDstDate (line 244) | public function wrapWithNonDstDate(Closure $func): void
method wrapWithUtf8LcTimeLocale (line 249) | public function wrapWithUtf8LcTimeLocale($locale, Closure $func): void
method withErrorAsException (line 273) | public function withErrorAsException(Closure $func): void
method standardizeDates (line 298) | public function standardizeDates($dates)
method areSameLocales (line 315) | protected function areSameLocales($a, $b): bool
method firstValidTimezoneAmong (line 330) | protected function firstValidTimezoneAmong(array $timezones): CarbonTi...
method assertPeriodOptions (line 345) | protected function assertPeriodOptions(int $options, CarbonPeriod $per...
method assertVeryClose (line 350) | protected function assertVeryClose(mixed $expected, mixed $actual, str...
method assertSameIntervals (line 360) | protected function assertSameIntervals(CarbonInterval $expected, Carbo...
method assertSameWithClosures (line 416) | protected function assertSameWithClosures(array $expected, array $actu...
method setLocaleOrSkip (line 423) | protected function setLocaleOrSkip(string ...$locales): void
method remove (line 439) | protected function remove(string $path): void
method acceptClosuresFrom (line 459) | private function acceptClosuresFrom(array $destination, array $source)...
method captureVarDump (line 479) | private function captureVarDump(mixed $value): string
method fetchProperties (line 489) | private function fetchProperties(object $object): array
FILE: tests/AbstractTestCaseWithOldNow.php
class AbstractTestCaseWithOldNow (line 19) | abstract class AbstractTestCaseWithOldNow extends AbstractTestCase
method tearDown (line 24) | protected function tearDown(): void
FILE: tests/Carbon/AddMonthsTest.php
class AddMonthsTest (line 21) | class AddMonthsTest extends AbstractTestCase
method setUp (line 28) | protected function setUp(): void
method dataForTestAddMonthNoOverflow (line 37) | public static function dataForTestAddMonthNoOverflow(): Generator
method testAddMonthNoOverflow (line 46) | #[DataProvider('dataForTestAddMonthNoOverflow')]
method testAddMonthsNoOverflow (line 52) | #[DataProvider('dataForTestAddMonthNoOverflow')]
method dataForTestSubMonthNoOverflow (line 58) | public static function dataForTestSubMonthNoOverflow(): Generator
method testSubMonthNoOverflow (line 67) | #[DataProvider('dataForTestSubMonthNoOverflow')]
method testSubMonthsNoOverflow (line 73) | #[DataProvider('dataForTestSubMonthNoOverflow')]
method dataForTestAddMonthWithOverflow (line 79) | public static function dataForTestAddMonthWithOverflow(): Generator
method testAddMonthWithOverflow (line 88) | #[DataProvider('dataForTestAddMonthWithOverflow')]
method testAddMonthsWithOverflow (line 94) | #[DataProvider('dataForTestAddMonthWithOverflow')]
method dataForTestSubMonthWithOverflow (line 100) | public static function dataForTestSubMonthWithOverflow(): Generator
method testSubMonthWithOverflow (line 109) | #[DataProvider('dataForTestSubMonthWithOverflow')]
method testSubMonthsWithOverflow (line 115) | #[DataProvider('dataForTestSubMonthWithOverflow')]
method testSetOverflowIsTrue (line 121) | public function testSetOverflowIsTrue()
method testSetOverflowIsFalse (line 127) | public function testSetOverflowIsFalse()
method testSetOverflowIsResetInTests (line 133) | public function testSetOverflowIsResetInTests()
method testSetOverflowIsReset (line 138) | public function testSetOverflowIsReset()
method testUseOverflowAddMonth (line 147) | #[DataProvider('dataForTestAddMonthWithOverflow')]
method testUseOverflowAddMonths (line 154) | #[DataProvider('dataForTestAddMonthWithOverflow')]
method testUseOverflowSubMonth (line 161) | #[DataProvider('dataForTestSubMonthWithOverflow')]
method testUseOverflowSubMonths (line 168) | #[DataProvider('dataForTestSubMonthWithOverflow')]
method testSkipOverflowAddMonth (line 175) | #[DataProvider('dataForTestAddMonthNoOverflow')]
method testSkipOverflowAddMonths (line 182) | #[DataProvider('dataForTestAddMonthNoOverflow')]
method testSkipOverflowSubMonth (line 189) | #[DataProvider('dataForTestSubMonthNoOverflow')]
method testSkipOverflowSubMonths (line 196) | #[DataProvider('dataForTestSubMonthNoOverflow')]
FILE: tests/Carbon/AddTest.php
class AddTest (line 22) | class AddTest extends AbstractTestCase
method testAddMethod (line 24) | public function testAddMethod()
method testAddYearsPositive (line 54) | public function testAddYearsPositive()
method testAddYearsZero (line 59) | public function testAddYearsZero()
method testAddYearsNegative (line 64) | public function testAddYearsNegative()
method testAddYear (line 69) | public function testAddYear()
method testAddDaysPositive (line 74) | public function testAddDaysPositive()
method testAddDaysZero (line 79) | public function testAddDaysZero()
method testAddDaysNegative (line 84) | public function testAddDaysNegative()
method testAddDay (line 89) | public function testAddDay()
method testAddOverflow (line 94) | public function testAddOverflow()
method testAddWeekdaysPositive (line 110) | public function testAddWeekdaysPositive()
method testAddCustomWeekdays (line 122) | public function testAddCustomWeekdays()
method testAddWeekdaysZero (line 151) | public function testAddWeekdaysZero()
method testAddWeekdaysNegative (line 156) | public function testAddWeekdaysNegative()
method testAddWeekday (line 161) | public function testAddWeekday()
method testAddWeekdayDuringWeekend (line 166) | public function testAddWeekdayDuringWeekend()
method testAddWeeksPositive (line 171) | public function testAddWeeksPositive()
method testAddWeeksZero (line 176) | public function testAddWeeksZero()
method testAddWeeksNegative (line 181) | public function testAddWeeksNegative()
method testAddWeek (line 186) | public function testAddWeek()
method testAddHoursPositive (line 191) | public function testAddHoursPositive()
method testAddHoursZero (line 196) | public function testAddHoursZero()
method testAddHoursNegative (line 201) | public function testAddHoursNegative()
method testAddHour (line 206) | public function testAddHour()
method testAddMinutesPositive (line 211) | public function testAddMinutesPositive()
method testAddMinutesZero (line 216) | public function testAddMinutesZero()
method testAddMinutesNegative (line 221) | public function testAddMinutesNegative()
method testAddMinute (line 226) | public function testAddMinute()
method testAddSecondsPositive (line 231) | public function testAddSecondsPositive()
method testAddSecondsZero (line 236) | public function testAddSecondsZero()
method testAddSecondsNegative (line 241) | public function testAddSecondsNegative()
method testAddDecimalSeconds (line 246) | public function testAddDecimalSeconds()
method testAddSecond (line 266) | public function testAddSecond()
method testAddMillisecondsPositive (line 271) | public function testAddMillisecondsPositive()
method testAddMillisecondsZero (line 276) | public function testAddMillisecondsZero()
method testAddMillisecondsNegative (line 281) | public function testAddMillisecondsNegative()
method testAddMillisecond (line 287) | public function testAddMillisecond()
method testAddMicrosecondsPositive (line 292) | public function testAddMicrosecondsPositive()
method testAddMicrosecondsZero (line 297) | public function testAddMicrosecondsZero()
method testAddMicrosecondsNegative (line 302) | public function testAddMicrosecondsNegative()
method testAddMicrosecond (line 308) | public function testAddMicrosecond()
method testAddYearPassingArg (line 316) | public function testAddYearPassingArg()
method testAddDayPassingArg (line 327) | public function testAddDayPassingArg()
method testAddHourPassingArg (line 335) | public function testAddHourPassingArg()
method testAddMinutePassingArg (line 343) | public function testAddMinutePassingArg()
method testAddSecondPassingArg (line 351) | public function testAddSecondPassingArg()
method testAddQuarter (line 359) | public function testAddQuarter()
method testAddQuarterNegative (line 364) | public function testAddQuarterNegative()
method testSubQuarter (line 372) | public function testSubQuarter()
method testSubQuarterNegative (line 377) | public function testSubQuarterNegative()
method testAddCentury (line 382) | public function testAddCentury()
method testAddCenturyNegative (line 394) | public function testAddCenturyNegative()
method testAddCenturies (line 405) | public function testAddCenturies()
method testAddCenturiesNegative (line 411) | public function testAddCenturiesNegative()
method testSubCentury (line 417) | public function testSubCentury()
method testSubCenturyNegative (line 429) | public function testSubCenturyNegative()
method testSubCenturies (line 440) | public function testSubCenturies()
method testSubCenturiesNegative (line 446) | public function testSubCenturiesNegative()
method testAddYearNoOverflow (line 452) | public function testAddYearNoOverflow()
method testAddYearWithOverflow (line 457) | public function testAddYearWithOverflow()
method testAddYearNoOverflowPassingArg (line 462) | public function testAddYearNoOverflowPassingArg()
method testAddYearWithOverflowPassingArg (line 467) | public function testAddYearWithOverflowPassingArg()
method testSubYearNoOverflowPassingArg (line 472) | public function testSubYearNoOverflowPassingArg()
method testSubYearWithOverflowPassingArg (line 477) | public function testSubYearWithOverflowPassingArg()
method testSubYearNoOverflow (line 482) | public function testSubYearNoOverflow()
method testSubYearWithOverflow (line 487) | public function testSubYearWithOverflow()
method testUseYearsOverflow (line 492) | public function testUseYearsOverflow()
FILE: tests/Carbon/ArraysTest.php
class ArraysTest (line 21) | class ArraysTest extends AbstractTestCase
method testToArray (line 23) | public function testToArray()
method testDebugInfo (line 67) | public function testDebugInfo()
method testDebuggingWithFormatException (line 97) | public function testDebuggingWithFormatException()
method testDebuggingUninitializedInstances (line 104) | public function testDebuggingUninitializedInstances()
FILE: tests/Carbon/ComparisonTest.php
class ComparisonTest (line 20) | class ComparisonTest extends AbstractTestCase
method testEqualToTrue (line 22) | public function testEqualToTrue()
method testEqualToFalse (line 27) | public function testEqualToFalse()
method testEqualWithTimezoneTrue (line 32) | public function testEqualWithTimezoneTrue()
method testEqualWithTimezoneFalse (line 37) | public function testEqualWithTimezoneFalse()
method testNotEqualToTrue (line 65) | public function testNotEqualToTrue()
method testNotEqualToFalse (line 70) | public function testNotEqualToFalse()
method testGreaterThanTrue (line 75) | public function testGreaterThanTrue()
method testGreaterThanFalse (line 80) | public function testGreaterThanFalse()
method testGreaterThanWithTimezoneTrue (line 85) | public function testGreaterThanWithTimezoneTrue()
method testGreaterThanWithString (line 92) | public function testGreaterThanWithString()
method testGreaterThanWithTimezoneFalse (line 100) | public function testGreaterThanWithTimezoneFalse()
method testGreaterThanOrEqualTrue (line 107) | public function testGreaterThanOrEqualTrue()
method testGreaterThanOrEqualTrueEqual (line 112) | public function testGreaterThanOrEqualTrueEqual()
method testGreaterThanOrEqualFalse (line 117) | public function testGreaterThanOrEqualFalse()
method testLessThanTrue (line 122) | public function testLessThanTrue()
method testLessThanFalse (line 127) | public function testLessThanFalse()
method testLessThanOrEqualTrue (line 132) | public function testLessThanOrEqualTrue()
method testLessThanOrEqualTrueEqual (line 137) | public function testLessThanOrEqualTrueEqual()
method testLessThanOrEqualFalse (line 142) | public function testLessThanOrEqualFalse()
method testBetweenEqualTrue (line 147) | public function testBetweenEqualTrue()
method testBetweenNotEqualTrue (line 170) | public function testBetweenNotEqualTrue()
method testBetweenExcludedTrue (line 195) | public function testBetweenExcludedTrue()
method testBetweenIncludedTrue (line 204) | public function testBetweenIncludedTrue()
method testBetweenIncludedFalse (line 215) | public function testBetweenIncludedFalse()
method testBetweenEqualFalse (line 224) | public function testBetweenEqualFalse()
method testBetweenNotEqualFalse (line 229) | public function testBetweenNotEqualFalse()
method testBetweenEqualSwitchTrue (line 234) | public function testBetweenEqualSwitchTrue()
method testBetweenNotEqualSwitchTrue (line 239) | public function testBetweenNotEqualSwitchTrue()
method testBetweenEqualSwitchFalse (line 244) | public function testBetweenEqualSwitchFalse()
method testBetweenNotEqualSwitchFalse (line 249) | public function testBetweenNotEqualSwitchFalse()
method testMinIsFluid (line 254) | public function testMinIsFluid()
method testMinWithNow (line 260) | public function testMinWithNow()
method testMinWithInstance (line 266) | public function testMinWithInstance()
method testMaxIsFluid (line 273) | public function testMaxIsFluid()
method testMaxWithNow (line 279) | public function testMaxWithNow()
method testMaxWithInstance (line 285) | public function testMaxWithInstance()
method testIsBirthday (line 292) | public function testIsBirthday()
method testClosest (line 316) | public function testClosest()
method testClosestWithEquals (line 325) | public function testClosestWithEquals()
method testClosestWithMicroseconds (line 334) | public function testClosestWithMicroseconds()
method testClosestWithFarDates (line 343) | public function testClosestWithFarDates()
method testFarthest (line 352) | public function testFarthest()
method testFarthestWithEquals (line 361) | public function testFarthestWithEquals()
method testFarthestWithMicroseconds (line 370) | public function testFarthestWithMicroseconds()
method testFarthestWithFarDates (line 379) | public function testFarthestWithFarDates()
FILE: tests/Carbon/ConstructTest.php
class ConstructTest (line 24) | class ConstructTest extends AbstractTestCase
method testCreatesAnInstanceDefaultToNow (line 26) | public function testCreatesAnInstanceDefaultToNow()
method testCreatesAnInstanceFromADateTime (line 37) | public function testCreatesAnInstanceFromADateTime()
method testCreatesAnInstanceFromADateTimeException (line 60) | public function testCreatesAnInstanceFromADateTimeException()
method testParseWithEmptyStringCreatesAnInstanceDefaultToNow (line 72) | public function testParseWithEmptyStringCreatesAnInstanceDefaultToNow()
method testParseZeroCreatesAnInstanceDefaultToUnixAreaStartUtc (line 87) | public function testParseZeroCreatesAnInstanceDefaultToUnixAreaStartUtc()
method testWithFancyString (line 102) | public function testWithFancyString()
method testParseWithFancyString (line 109) | public function testParseWithFancyString()
method testParseWithYYYMMDD (line 116) | public function testParseWithYYYMMDD()
method testParseWithYYYMMDDHHMMSS (line 122) | public function testParseWithYYYMMDDHHMMSS()
method testDefaultTimezone (line 128) | public function testDefaultTimezone()
method testParseWithDefaultTimezone (line 134) | public function testParseWithDefaultTimezone()
method testSettingTimezone (line 140) | public function testSettingTimezone()
method testParseSettingTimezone (line 152) | public function testParseSettingTimezone()
method testSettingTimezoneWithString (line 164) | public function testSettingTimezoneWithString()
method testParseSettingTimezoneWithString (line 176) | public function testParseSettingTimezoneWithString()
method testSettingTimezoneWithInteger (line 188) | public function testSettingTimezoneWithInteger()
method testMockingWithMicroseconds (line 196) | public function testMockingWithMicroseconds()
method testTimestamp (line 207) | public function testTimestamp()
method testFloatTimestamp (line 216) | public function testFloatTimestamp()
method testDifferentType (line 225) | public function testDifferentType()
FILE: tests/Carbon/CopyTest.php
class CopyTest (line 19) | class CopyTest extends AbstractTestCase
method testCopy (line 21) | public function testCopy()
method testClone (line 28) | public function testClone()
method testCopyEnsureTzIsCopied (line 35) | public function testCopyEnsureTzIsCopied()
method testCopyEnsureMicrosAreCopied (line 43) | public function testCopyEnsureMicrosAreCopied()
FILE: tests/Carbon/CreateFromDateTest.php
class CreateFromDateTest (line 20) | class CreateFromDateTest extends AbstractTestCase
method testCreateFromDateWithDefaults (line 22) | public function testCreateFromDateWithDefaults()
method testCreateFromDate (line 28) | public function testCreateFromDate()
method testCreateFromDateWithYear (line 34) | public function testCreateFromDateWithYear()
method testCreateFromDateWithMonth (line 40) | public function testCreateFromDateWithMonth()
method testCreateFromDateWithDay (line 46) | public function testCreateFromDateWithDay()
method testCreateFromDateWithTimezone (line 52) | public function testCreateFromDateWithTimezone()
method testCreateFromDateWithDateTimeZone (line 59) | public function testCreateFromDateWithDateTimeZone()
FILE: tests/Carbon/CreateFromFormatTest.php
class CreateFromFormatTest (line 23) | class CreateFromFormatTest extends AbstractTestCase
method setUp (line 35) | protected function setUp(): void
method testCreateFromFormatReturnsCarbon (line 47) | public function testCreateFromFormatReturnsCarbon()
method testCreateFromFormatWithNamedArguments (line 54) | public function testCreateFromFormatWithNamedArguments()
method testCreateFromFalseTimezone (line 64) | public function testCreateFromFalseTimezone()
method testCFormat (line 74) | public function testCFormat()
method testCreateFromFormatWithMillisecondsAlone (line 91) | public function testCreateFromFormatWithMillisecondsAlone()
method testCreateFromFormatWithMillisecondsMerged (line 101) | public function testCreateFromFormatWithMillisecondsMerged()
method testCreateFromFormatWithTimezoneString (line 108) | public function testCreateFromFormatWithTimezoneString()
method testCreateFromFormatWithTimezone (line 115) | public function testCreateFromFormatWithTimezone()
method testCreateFromFormatWithMillis (line 122) | public function testCreateFromFormatWithMillis()
method testCreateFromFormatWithTestNow (line 128) | public function testCreateFromFormatWithTestNow()
method testCreateLastErrorsCanBeAccessedByExtendingClass (line 138) | #[RequiresPhp('>=8.2')]
method testCreateFromFormatHandlesLastErrors (line 144) | public function testCreateFromFormatHandlesLastErrors()
method testCreateFromFormatResetLastErrors (line 153) | #[RequiresPhp('>=8.2')]
FILE: tests/Carbon/CreateFromTimeStringTest.php
class CreateFromTimeStringTest (line 20) | class CreateFromTimeStringTest extends AbstractTestCase
method setUp (line 22) | protected function setUp(): void
method testCreateFromTimeString (line 28) | public function testCreateFromTimeString()
method testCreateFromTimeStringWithSecond (line 37) | public function testCreateFromTimeStringWithSecond()
method testCreateFromTimeStringWithMicroSecond (line 46) | public function testCreateFromTimeStringWithMicroSecond()
method testCreateFromTimeStringWithDateTimeZone (line 55) | public function testCreateFromTimeStringWithDateTimeZone()
method testCreateFromTimeStringWithTimeZoneString (line 62) | public function testCreateFromTimeStringWithTimeZoneString()
FILE: tests/Carbon/CreateFromTimeTest.php
class CreateFromTimeTest (line 23) | class CreateFromTimeTest extends AbstractTestCase
method testCreateWithTestNow (line 25) | public function testCreateWithTestNow()
method testCreateFromDateWithDefaults (line 34) | public function testCreateFromDateWithDefaults()
method testCreateFromDateWithNull (line 40) | public function testCreateFromDateWithNull()
method testCreateFromTime (line 46) | public function testCreateFromTime()
method testCreateFromTimeWithTestNow (line 52) | public function testCreateFromTimeWithTestNow()
method testCreateFromTimeGreaterThan99 (line 69) | public function testCreateFromTimeGreaterThan99()
method testCreateFromTimeWithHour (line 78) | public function testCreateFromTimeWithHour()
method testCreateFromTimeWithMinute (line 86) | public function testCreateFromTimeWithMinute()
method testCreateFromTimeWithSecond (line 92) | public function testCreateFromTimeWithSecond()
method testCreateFromTimeWithDateTimeZone (line 98) | public function testCreateFromTimeWithDateTimeZone()
method testCreateFromTimeWithTimeZoneString (line 105) | public function testCreateFromTimeWithTimeZoneString()
method testCreateFromTimeWithTimeZoneOnNow (line 112) | public function testCreateFromTimeWithTimeZoneOnNow()
FILE: tests/Carbon/CreateFromTimestampTest.php
class CreateFromTimestampTest (line 20) | class CreateFromTimestampTest extends AbstractTestCase
method testCreateReturnsDatingInstance (line 22) | public function testCreateReturnsDatingInstance()
method testCreateFromTimestampMs (line 28) | public function testCreateFromTimestampMs()
method testCreateFromTimestampMsUTC (line 57) | public function testCreateFromTimestampMsUTC()
method testComaDecimalSeparatorLocale (line 99) | public function testComaDecimalSeparatorLocale()
method testCreateFromTimestampWithTimezone (line 131) | public function testCreateFromTimestampWithTimezone()
method testCreateFromTimestampUsesDefaultTimezone (line 139) | public function testCreateFromTimestampUsesDefaultTimezone()
method testCreateFromTimestampWithDateTimeZone (line 148) | public function testCreateFromTimestampWithDateTimeZone()
method testCreateFromTimestampWithString (line 155) | public function testCreateFromTimestampWithString()
method testCreateFromTimestampGMTDoesNotUseDefaultTimezone (line 163) | public function testCreateFromTimestampGMTDoesNotUseDefaultTimezone()
method testCreateFromTimestampInDstChange (line 175) | public function testCreateFromTimestampInDstChange()
method testCreateFromMicrotimeFloat (line 195) | public function testCreateFromMicrotimeFloat()
method testCreateFromMicrotimeStrings (line 204) | public function testCreateFromMicrotimeStrings()
method testCreateFromMicrotimeUTCFloat (line 225) | public function testCreateFromMicrotimeUTCFloat()
method testCreateFromMicrotimeUTCStrings (line 234) | public function testCreateFromMicrotimeUTCStrings()
method testNegativeIntegerTimestamp (line 249) | public function testNegativeIntegerTimestamp()
FILE: tests/Carbon/CreateSafeTest.php
class CreateSafeTest (line 20) | class CreateSafeTest extends AbstractTestCase
method testInvalidDateExceptionProperties (line 22) | public function testInvalidDateExceptionProperties()
method testCreateSafeThrowsExceptionForSecondLowerThanZero (line 29) | public function testCreateSafeThrowsExceptionForSecondLowerThanZero()
method testCreateSafeThrowsExceptionForSecondLowerThanZeroInStrictMode (line 36) | public function testCreateSafeThrowsExceptionForSecondLowerThanZeroInS...
method testCreateSafeThrowsExceptionForSecondGreaterThan59 (line 42) | public function testCreateSafeThrowsExceptionForSecondGreaterThan59()
method testCreateSafeThrowsExceptionForMinuteLowerThanZero (line 49) | public function testCreateSafeThrowsExceptionForMinuteLowerThanZero()
method testCreateSafeThrowsExceptionForMinuteGreaterThan59 (line 56) | public function testCreateSafeThrowsExceptionForMinuteGreaterThan59()
method testCreateSafeThrowsExceptionForHourLowerThanZero (line 63) | public function testCreateSafeThrowsExceptionForHourLowerThanZero()
method testCreateSafeThrowsExceptionForHourGreaterThan24 (line 70) | public function testCreateSafeThrowsExceptionForHourGreaterThan24()
method testCreateSafeThrowsExceptionForDayLowerThanZero (line 77) | public function testCreateSafeThrowsExceptionForDayLowerThanZero()
method testCreateSafeThrowsExceptionForDayGreaterThan31 (line 84) | public function testCreateSafeThrowsExceptionForDayGreaterThan31()
method testCreateSafeThrowsExceptionForMonthLowerThanZero (line 91) | public function testCreateSafeThrowsExceptionForMonthLowerThanZero()
method testCreateSafeThrowsExceptionForMonthGreaterThan12 (line 98) | public function testCreateSafeThrowsExceptionForMonthGreaterThan12()
method testCreateSafeThrowsExceptionForYearEqualToZero (line 105) | public function testCreateSafeThrowsExceptionForYearEqualToZero()
method testCreateSafeThrowsExceptionForYearLowerThanZero (line 112) | public function testCreateSafeThrowsExceptionForYearLowerThanZero()
method testCreateSafeThrowsExceptionForYearGreaterThan12 (line 119) | public function testCreateSafeThrowsExceptionForYearGreaterThan12()
method testCreateSafeThrowsExceptionForInvalidDayInShortMonth (line 126) | public function testCreateSafeThrowsExceptionForInvalidDayInShortMonth()
method testCreateSafeThrowsExceptionForInvalidDayForFebruaryInLeapYear (line 134) | public function testCreateSafeThrowsExceptionForInvalidDayForFebruaryI...
method testCreateSafeThrowsExceptionForInvalidDayForFebruaryInLeapYearInStrictMode (line 143) | public function testCreateSafeThrowsExceptionForInvalidDayForFebruaryI...
method testCreateSafePassesForFebruaryInLeapYear (line 149) | public function testCreateSafePassesForFebruaryInLeapYear()
method testCreateSafeThrowsExceptionForInvalidDayForFebruaryInNonLeapYear (line 155) | public function testCreateSafeThrowsExceptionForInvalidDayForFebruaryI...
method testCreateSafePassesForInvalidDSTTime (line 164) | public function testCreateSafePassesForInvalidDSTTime()
method testCreateSafePassesForValidDSTTime (line 178) | public function testCreateSafePassesForValidDSTTime()
method testCreateSafeThrowsExceptionForWithNonIntegerValue (line 185) | public function testCreateSafeThrowsExceptionForWithNonIntegerValue()
method testCreateSafePassesForFebruaryInNonLeapYear (line 192) | public function testCreateSafePassesForFebruaryInNonLeapYear()
method testCreateSafePasses (line 198) | public function testCreateSafePasses()
FILE: tests/Carbon/CreateStrictTest.php
class CreateStrictTest (line 21) | class CreateStrictTest extends AbstractTestCase
method testCreateStrictThrowsExceptionForSecondLowerThanZero (line 23) | public function testCreateStrictThrowsExceptionForSecondLowerThanZero()
method testCreateStrictThrowsExceptionForMonthOverRange (line 30) | public function testCreateStrictThrowsExceptionForMonthOverRange()
method testCreateStrictDoesNotAllowFormatString (line 37) | public function testCreateStrictDoesNotAllowFormatString()
method testCreateStrictResetsStrictModeOnSuccess (line 44) | public function testCreateStrictResetsStrictModeOnSuccess()
method testCreateStrictResetsStrictModeOnFailure (line 53) | public function testCreateStrictResetsStrictModeOnFailure()
FILE: tests/Carbon/CreateTest.php
class CreateTest (line 26) | class CreateTest extends AbstractTestCase
method testCreateReturnsDatingInstance (line 28) | public function testCreateReturnsDatingInstance()
method testCreateWithDefaults (line 34) | public function testCreateWithDefaults()
method testCreateWithNull (line 40) | public function testCreateWithNull()
method testCreateWithYear (line 46) | public function testCreateWithYear()
method testCreateHandlesNegativeYear (line 52) | public function testCreateHandlesNegativeYear()
method testCreateHandlesFiveDigitsPositiveYears (line 58) | public function testCreateHandlesFiveDigitsPositiveYears()
method testCreateHandlesFiveDigitsNegativeYears (line 64) | public function testCreateHandlesFiveDigitsNegativeYears()
method testCreateWithMonth (line 70) | public function testCreateWithMonth()
method testCreateWithInvalidMonth (line 76) | public function testCreateWithInvalidMonth()
method testOutOfRangeException (line 85) | public function testOutOfRangeException()
method testCreateWithInvalidMonthNonStrictMode (line 103) | public function testCreateWithInvalidMonthNonStrictMode()
method testCreateMonthWraps (line 112) | public function testCreateMonthWraps()
method testCreateWithDay (line 118) | public function testCreateWithDay()
method testCreateWithInvalidDay (line 124) | public function testCreateWithInvalidDay()
method testCreateDayWraps (line 133) | public function testCreateDayWraps()
method testCreateWithHourAndDefaultMinSecToZero (line 139) | public function testCreateWithHourAndDefaultMinSecToZero()
method testCreateWithInvalidHour (line 147) | public function testCreateWithInvalidHour()
method testCreateHourWraps (line 156) | public function testCreateHourWraps()
method testCreateWithMinute (line 162) | public function testCreateWithMinute()
method testCreateWithInvalidMinute (line 168) | public function testCreateWithInvalidMinute()
method testCreateMinuteWraps (line 177) | public function testCreateMinuteWraps()
method testCreateWithSecond (line 183) | public function testCreateWithSecond()
method testCreateWithInvalidSecond (line 189) | public function testCreateWithInvalidSecond()
method testCreateSecondsWrap (line 198) | public function testCreateSecondsWrap()
method testCreateWithDateTimeZone (line 204) | public function testCreateWithDateTimeZone()
method testCreateWithTimeZoneString (line 211) | public function testCreateWithTimeZoneString()
method testMake (line 218) | public function testMake()
method testCreateWithInvalidTimezoneOffset (line 226) | public function testCreateWithInvalidTimezoneOffset()
method testCreateWithValidTimezoneOffset (line 235) | public function testCreateWithValidTimezoneOffset()
method testParseFromLocale (line 244) | public function testParseFromLocale()
method testParseFromLocaleForEachLocale (line 311) | #[Group('localization')]
method testParseFromLocaleWithDefaultLocale (line 322) | public function testParseFromLocaleWithDefaultLocale()
method testCreateFromLocaleFormat (line 343) | public function testCreateFromLocaleFormat()
method testCreateFromIsoFormat (line 384) | public function testCreateFromIsoFormat()
method testCreateFromIsoFormatException (line 391) | public function testCreateFromIsoFormatException()
method testCreateFromLocaleIsoFormat (line 400) | public function testCreateFromLocaleIsoFormat()
method dataForLocales (line 417) | public static function dataForLocales(): array
FILE: tests/Carbon/DayOfWeekModifiersTest.php
class DayOfWeekModifiersTest (line 19) | class DayOfWeekModifiersTest extends AbstractTestCase
method testGetWeekendDays (line 21) | public function testGetWeekendDays()
method testSetWeekendDays (line 26) | public function testSetWeekendDays()
method testStartOfWeek (line 36) | public function testStartOfWeek()
method testStartOfWeekFromWeekStart (line 51) | public function testStartOfWeekFromWeekStart()
method testStartOfWeekCrossingYearBoundary (line 57) | public function testStartOfWeekCrossingYearBoundary()
method testEndOfWeek (line 64) | public function testEndOfWeek()
method testEndOfWeekFromWeekEnd (line 70) | public function testEndOfWeekFromWeekEnd()
method testEndOfWeekCrossingYearBoundary (line 76) | public function testEndOfWeekCrossingYearBoundary()
method testStartOrEndOfWeekFromWeekWithUTC (line 86) | public function testStartOrEndOfWeekFromWeekWithUTC()
method testStartOrEndOfWeekFromWeekWithOtherTimezone (line 96) | public function testStartOrEndOfWeekFromWeekWithOtherTimezone()
method testNext (line 103) | public function testNext()
method testNextMonday (line 109) | public function testNextMonday()
method testNextSaturday (line 118) | public function testNextSaturday()
method testNextTimestamp (line 124) | public function testNextTimestamp()
method testPrevious (line 130) | public function testPrevious()
method testPreviousMonday (line 136) | public function testPreviousMonday()
method testPreviousSaturday (line 142) | public function testPreviousSaturday()
method testPreviousTimestamp (line 148) | public function testPreviousTimestamp()
method testFirstDayOfMonth (line 154) | public function testFirstDayOfMonth()
method testFirstWednesdayOfMonth (line 160) | public function testFirstWednesdayOfMonth()
method testFirstFridayOfMonth (line 166) | public function testFirstFridayOfMonth()
method testLastDayOfMonth (line 172) | public function testLastDayOfMonth()
method testLastTuesdayOfMonth (line 178) | public function testLastTuesdayOfMonth()
method testLastFridayOfMonth (line 184) | public function testLastFridayOfMonth()
method testNthOfMonthOutsideScope (line 190) | public function testNthOfMonthOutsideScope()
method testNthOfMonthOutsideYear (line 195) | public function testNthOfMonthOutsideYear()
method test2ndMondayOfMonth (line 200) | public function test2ndMondayOfMonth()
method test3rdWednesdayOfMonth (line 206) | public function test3rdWednesdayOfMonth()
method testFirstDayOfQuarter (line 212) | public function testFirstDayOfQuarter()
method testFirstWednesdayOfQuarter (line 218) | public function testFirstWednesdayOfQuarter()
method testFirstFridayOfQuarter (line 224) | public function testFirstFridayOfQuarter()
method testFirstOfQuarterFromADayThatWillNotExistInTheFirstMonth (line 230) | public function testFirstOfQuarterFromADayThatWillNotExistInTheFirstMo...
method testLastDayOfQuarter (line 236) | public function testLastDayOfQuarter()
method testLastTuesdayOfQuarter (line 242) | public function testLastTuesdayOfQuarter()
method testLastFridayOfQuarter (line 248) | public function testLastFridayOfQuarter()
method testLastOfQuarterFromADayThatWillNotExistInTheLastMonth (line 254) | public function testLastOfQuarterFromADayThatWillNotExistInTheLastMonth()
method testNthOfQuarterOutsideScope (line 260) | public function testNthOfQuarterOutsideScope()
method testNthOfQuarterOutsideYear (line 265) | public function testNthOfQuarterOutsideYear()
method testNthOfQuarterFromADayThatWillNotExistInTheFirstMonth (line 270) | public function testNthOfQuarterFromADayThatWillNotExistInTheFirstMonth()
method test2ndMondayOfQuarter (line 276) | public function test2ndMondayOfQuarter()
method test3rdWednesdayOfQuarter (line 282) | public function test3rdWednesdayOfQuarter()
method testFirstDayOfYear (line 288) | public function testFirstDayOfYear()
method testFirstWednesdayOfYear (line 294) | public function testFirstWednesdayOfYear()
method testFirstFridayOfYear (line 300) | public function testFirstFridayOfYear()
method testLastDayOfYear (line 306) | public function testLastDayOfYear()
method testLastTuesdayOfYear (line 312) | public function testLastTuesdayOfYear()
method testLastFridayOfYear (line 318) | public function testLastFridayOfYear()
method testNthOfYearOutsideScope (line 324) | public function testNthOfYearOutsideScope()
method test2ndMondayOfYear (line 329) | public function test2ndMondayOfYear()
method test3rdWednesdayOfYear (line 335) | public function test3rdWednesdayOfYear()
method testNextWeekday (line 341) | public function testNextWeekday()
method testPreviousWeekday (line 360) | public function testPreviousWeekday()
method testNextWeekendDay (line 379) | public function testNextWeekendDay()
method testPreviousWeekendDay (line 398) | public function testPreviousWeekendDay()
method testWeekStartAndEndWithAutoMode (line 417) | public function testWeekStartAndEndWithAutoMode()
FILE: tests/Carbon/DiffTest.php
class DiffTest (line 28) | class DiffTest extends AbstractTestCase
method wrapWithTestNow (line 30) | public function wrapWithTestNow(Closure $func, ?CarbonInterface $dt = ...
method testDiffAsCarbonInterval (line 35) | public function testDiffAsCarbonInterval()
method testDiffInYearsPositive (line 42) | public function testDiffInYearsPositive()
method testDiffInYearsNegativeWithSign (line 48) | public function testDiffInYearsNegativeWithSign()
method testDiffInYearsNegativeNoSign (line 54) | public function testDiffInYearsNegativeNoSign()
method testDiffInYearsVsDefaultNow (line 60) | public function testDiffInYearsVsDefaultNow()
method testDiffInYearsEnsureIsTruncated (line 67) | public function testDiffInYearsEnsureIsTruncated()
method testDiffInQuartersPositive (line 73) | public function testDiffInQuartersPositive()
method testDiffInQuartersNegativeWithSign (line 79) | public function testDiffInQuartersNegativeWithSign()
method testDiffInQuartersNegativeWithNoSign (line 85) | public function testDiffInQuartersNegativeWithNoSign()
method testDiffInQuartersVsDefaultNow (line 91) | public function testDiffInQuartersVsDefaultNow()
method testDiffInQuartersEnsureIsTruncated (line 98) | public function testDiffInQuartersEnsureIsTruncated()
method testDiffInMonthsPositive (line 104) | public function testDiffInMonthsPositive()
method testDiffInMonthsNegativeWithSign (line 110) | public function testDiffInMonthsNegativeWithSign()
method testDiffInMonthsWithTimezone (line 116) | public function testDiffInMonthsWithTimezone()
method testDiffInMonthsNegativeNoSign (line 157) | public function testDiffInMonthsNegativeNoSign()
method testDiffInMonthsVsDefaultNow (line 163) | public function testDiffInMonthsVsDefaultNow()
method testDiffInMonthsEnsureIsTruncated (line 170) | public function testDiffInMonthsEnsureIsTruncated()
method testDiffInDaysPositive (line 176) | public function testDiffInDaysPositive()
method testDiffInDaysNegativeWithSign (line 182) | public function testDiffInDaysNegativeWithSign()
method testDiffInDaysNegativeNoSign (line 188) | public function testDiffInDaysNegativeNoSign()
method testDiffInDaysVsDefaultNow (line 194) | public function testDiffInDaysVsDefaultNow()
method testDiffInDaysEnsureIsTruncated (line 201) | public function testDiffInDaysEnsureIsTruncated()
method testDiffInDaysFilteredPositiveWithMutated (line 207) | public function testDiffInDaysFilteredPositiveWithMutated()
method testDiffInDaysFilteredPositiveWithSecondObject (line 215) | public function testDiffInDaysFilteredPositiveWithSecondObject()
method testDiffInDaysFilteredNegativeNoSignWithMutated (line 225) | public function testDiffInDaysFilteredNegativeNoSignWithMutated()
method testDiffInDaysFilteredNegativeNoSignWithSecondObject (line 233) | public function testDiffInDaysFilteredNegativeNoSignWithSecondObject()
method testDiffInDaysFilteredNegativeWithSignWithMutated (line 243) | public function testDiffInDaysFilteredNegativeWithSignWithMutated()
method testDiffInDaysFilteredNegativeWithSignWithSecondObject (line 251) | public function testDiffInDaysFilteredNegativeWithSignWithSecondObject()
method testDiffInHoursFiltered (line 261) | public function testDiffInHoursFiltered()
method testDiffInHoursFilteredNegative (line 271) | public function testDiffInHoursFilteredNegative()
method testDiffInHoursFilteredWorkHoursPerWeek (line 281) | public function testDiffInHoursFilteredWorkHoursPerWeek()
method testDiffFilteredUsingMinutesPositiveWithMutated (line 291) | public function testDiffFilteredUsingMinutesPositiveWithMutated()
method testDiffFilteredPositiveWithSecondObject (line 299) | public function testDiffFilteredPositiveWithSecondObject()
method testDiffFilteredNegativeNoSignWithMutated (line 309) | public function testDiffFilteredNegativeNoSignWithMutated()
method testDiffFilteredNegativeNoSignWithSecondObject (line 318) | public function testDiffFilteredNegativeNoSignWithSecondObject()
method testDiffFilteredNegativeWithSignWithMutated (line 328) | public function testDiffFilteredNegativeWithSignWithMutated()
method testDiffFilteredNegativeWithSignWithSecondObject (line 336) | public function testDiffFilteredNegativeWithSignWithSecondObject()
method testBug188DiffWithSameDates (line 346) | public function testBug188DiffWithSameDates()
method testBug188DiffWithDatesOnlyHoursApart (line 355) | public function testBug188DiffWithDatesOnlyHoursApart()
method testBug188DiffWithSameDates1DayApart (line 364) | public function testBug188DiffWithSameDates1DayApart()
method testBug188DiffWithDatesOnTheWeekend (line 373) | public function testBug188DiffWithDatesOnTheWeekend()
method testNearlyOneDayDiff (line 383) | public function testNearlyOneDayDiff()
method testBug2798ConsistencyWithDiffInDays (line 395) | public function testBug2798ConsistencyWithDiffInDays()
method testDiffInWeekdaysPositive (line 443) | public function testDiffInWeekdaysPositive()
method testDiffInWeekdaysNegativeNoSign (line 449) | public function testDiffInWeekdaysNegativeNoSign()
method testDiffInWeekdaysNegativeWithSign (line 455) | public function testDiffInWeekdaysNegativeWithSign()
method testDiffInWeekendDaysPositive (line 461) | public function testDiffInWeekendDaysPositive()
method testDiffInWeekendDaysNegativeNoSign (line 467) | public function testDiffInWeekendDaysNegativeNoSign()
method testDiffInWeekendDaysNegativeWithSign (line 473) | public function testDiffInWeekendDaysNegativeWithSign()
method testDiffInWeeksPositive (line 479) | public function testDiffInWeeksPositive()
method testDiffInWeeksNegativeWithSign (line 485) | public function testDiffInWeeksNegativeWithSign()
method testDiffInWeeksNegativeNoSign (line 491) | public function testDiffInWeeksNegativeNoSign()
method testDiffInWeeksVsDefaultNow (line 497) | public function testDiffInWeeksVsDefaultNow()
method testDiffInWeeksEnsureIsTruncated (line 504) | public function testDiffInWeeksEnsureIsTruncated()
method testDiffInHoursPositive (line 510) | public function testDiffInHoursPositive()
method testDiffInHoursNegativeWithSign (line 516) | public function testDiffInHoursNegativeWithSign()
method testDiffInHoursNegativeNoSign (line 522) | public function testDiffInHoursNegativeNoSign()
method testDiffInHoursVsDefaultNow (line 528) | public function testDiffInHoursVsDefaultNow()
method testDiffInHoursEnsureIsTruncated (line 535) | public function testDiffInHoursEnsureIsTruncated()
method testDiffInHoursWithTimezones (line 541) | public function testDiffInHoursWithTimezones()
method testDiffInMinutesPositive (line 563) | public function testDiffInMinutesPositive()
method testDiffInMinutesPositiveALot (line 569) | public function testDiffInMinutesPositiveALot()
method testDiffInMinutesNegativeWithSign (line 575) | public function testDiffInMinutesNegativeWithSign()
method testDiffInMinutesNegativeNoSign (line 581) | public function testDiffInMinutesNegativeNoSign()
method testDiffInMinutesVsDefaultNow (line 587) | public function testDiffInMinutesVsDefaultNow()
method testDiffInMinutesEnsureIsTruncated (line 594) | public function testDiffInMinutesEnsureIsTruncated()
method testDiffInSecondsPositive (line 600) | public function testDiffInSecondsPositive()
method testDiffInSecondsPositiveALot (line 606) | public function testDiffInSecondsPositiveALot()
method testDiffInSecondsNegativeWithSign (line 612) | public function testDiffInSecondsNegativeWithSign()
method testDiffInSecondsNegativeNoSign (line 618) | public function testDiffInSecondsNegativeNoSign()
method testDiffInSecondsVsDefaultNow (line 624) | public function testDiffInSecondsVsDefaultNow()
method testDiffInSecondsEnsureIsTruncated (line 631) | public function testDiffInSecondsEnsureIsTruncated()
method testDiffInSecondsWithTimezones (line 637) | public function testDiffInSecondsWithTimezones()
method testDiffInSecondsWithTimezonesAndVsDefault (line 648) | public function testDiffInSecondsWithTimezonesAndVsDefault()
method testDiffForHumansNowAndSecond (line 657) | public function testDiffForHumansNowAndSecond()
method testDiffInTheFuture (line 667) | public function testDiffInTheFuture()
method testDiffWithSkippedUnits (line 678) | public function testDiffWithSkippedUnits()
method testDiffForHumansNowAndSecondWithTimezone (line 724) | public function testDiffForHumansNowAndSecondWithTimezone()
method testDiffForHumansNowAndSeconds (line 733) | public function testDiffForHumansNowAndSeconds()
method testDiffForHumansNowAndNearlyMinute (line 740) | public function testDiffForHumansNowAndNearlyMinute()
method testDiffForHumansNowAndMinute (line 747) | public function testDiffForHumansNowAndMinute()
method testDiffForHumansNowAndMinutes (line 754) | public function testDiffForHumansNowAndMinutes()
method testDiffForHumansNowAndNearlyHour (line 761) | public function testDiffForHumansNowAndNearlyHour()
method testDiffForHumansNowAndHour (line 768) | public function testDiffForHumansNowAndHour()
method testDiffForHumansNowAndHours (line 775) | public function testDiffForHumansNowAndHours()
method testDiffForHumansNowAndNearlyDay (line 782) | public function testDiffForHumansNowAndNearlyDay()
method testDiffForHumansNowAndDay (line 789) | public function testDiffForHumansNowAndDay()
method testDiffForHumansNowAndDays (line 796) | public function testDiffForHumansNowAndDays()
method testDiffForHumansNowAndNearlyWeek (line 803) | public function testDiffForHumansNowAndNearlyWeek()
method testDiffForHumansNowAndWeek (line 810) | public function testDiffForHumansNowAndWeek()
method testDiffForHumansNowAndWeeks (line 817) | public function testDiffForHumansNowAndWeeks()
method testDiffForHumansNowAndNearlyMonth (line 824) | public function testDiffForHumansNowAndNearlyMonth()
method testDiffForHumansNowAndMonth (line 831) | public function testDiffForHumansNowAndMonth()
method testDiffForHumansNowAndMonths (line 838) | public function testDiffForHumansNowAndMonths()
method testDiffForHumansNowAndNearlyYear (line 845) | public function testDiffForHumansNowAndNearlyYear()
method testDiffForHumansNowAndYear (line 852) | public function testDiffForHumansNowAndYear()
method testDiffForHumansNowAndYears (line 859) | public function testDiffForHumansNowAndYears()
method testDiffForHumansNowAndFutureSecond (line 866) | public function testDiffForHumansNowAndFutureSecond()
method testDiffForHumansNowAndFutureSeconds (line 873) | public function testDiffForHumansNowAndFutureSeconds()
method testDiffForHumansNowAndNearlyFutureMinute (line 880) | public function testDiffForHumansNowAndNearlyFutureMinute()
method testDiffForHumansNowAndFutureMinute (line 887) | public function testDiffForHumansNowAndFutureMinute()
method testDiffForHumansNowAndFutureMinutes (line 894) | public function testDiffForHumansNowAndFutureMinutes()
method testDiffForHumansNowAndNearlyFutureHour (line 901) | public function testDiffForHumansNowAndNearlyFutureHour()
method testDiffForHumansNowAndFutureHour (line 908) | public function testDiffForHumansNowAndFutureHour()
method testDiffForHumansNowAndFutureHours (line 915) | public function testDiffForHumansNowAndFutureHours()
method testDiffForHumansNowAndNearlyFutureDay (line 922) | public function testDiffForHumansNowAndNearlyFutureDay()
method testDiffForHumansNowAndFutureDay (line 929) | public function testDiffForHumansNowAndFutureDay()
method testDiffForHumansNowAndFutureDays (line 936) | public function testDiffForHumansNowAndFutureDays()
method testDiffForHumansNowAndNearlyFutureWeek (line 943) | public function testDiffForHumansNowAndNearlyFutureWeek()
method testDiffForHumansNowAndFutureWeek (line 950) | public function testDiffForHumansNowAndFutureWeek()
method testDiffForHumansNowAndFutureWeeks (line 957) | public function testDiffForHumansNowAndFutureWeeks()
method testDiffForHumansNowAndNearlyFutureMonth (line 964) | public function testDiffForHumansNowAndNearlyFutureMonth()
method testDiffForHumansNowAndFutureMonth (line 971) | public function testDiffForHumansNowAndFutureMonth()
method testDiffForHumansNowAndFutureMonths (line 979) | public function testDiffForHumansNowAndFutureMonths()
method testDiffForHumansNowAndNearlyFutureYear (line 986) | public function testDiffForHumansNowAndNearlyFutureYear()
method testDiffForHumansNowAndFutureYear (line 993) | public function testDiffForHumansNowAndFutureYear()
method testDiffForHumansNowAndFutureYears (line 1000) | public function testDiffForHumansNowAndFutureYears()
method testDiffForHumansOtherAndSecond (line 1007) | public function testDiffForHumansOtherAndSecond()
method testDiffForHumansOtherAndSeconds (line 1014) | public function testDiffForHumansOtherAndSeconds()
method testDiffForHumansOtherAndNearlyMinute (line 1021) | public function testDiffForHumansOtherAndNearlyMinute()
method testDiffForHumansOtherAndMinute (line 1028) | public function testDiffForHumansOtherAndMinute()
method testDiffForHumansOtherAndMinutes (line 1035) | public function testDiffForHumansOtherAndMinutes()
method testDiffForHumansOtherAndNearlyHour (line 1042) | public function testDiffForHumansOtherAndNearlyHour()
method testDiffForHumansOtherAndHour (line 1049) | public function testDiffForHumansOtherAndHour()
method testDiffForHumansOtherAndHours (line 1056) | public function testDiffForHumansOtherAndHours()
method testDiffForHumansOtherAndNearlyDay (line 1063) | public function testDiffForHumansOtherAndNearlyDay()
method testDiffForHumansOtherAndDay (line 1070) | public function testDiffForHumansOtherAndDay()
method testDiffForHumansOtherAndDays (line 1077) | public function testDiffForHumansOtherAndDays()
method testDiffForHumansOtherAndNearlyWeek (line 1084) | public function testDiffForHumansOtherAndNearlyWeek()
method testDiffForHumansOverWeekWithDefaultPartsCount (line 1091) | public function testDiffForHumansOverWeekWithDefaultPartsCount()
method testDiffForHumansOverWeekWithPartsCount1 (line 1098) | public function testDiffForHumansOverWeekWithPartsCount1()
method testDiffForHumansOverWeekWithPartsCount2 (line 1108) | public function testDiffForHumansOverWeekWithPartsCount2()
method testDiffForHumansOverWeekWithMicrosecondsBuggyGap (line 1118) | public function testDiffForHumansOverWeekWithMicrosecondsBuggyGap()
method testDiffForHumansOtherAndWeek (line 1129) | public function testDiffForHumansOtherAndWeek()
method testDiffForHumansOtherAndWeeks (line 1136) | public function testDiffForHumansOtherAndWeeks()
method testDiffForHumansOtherAndNearlyMonth (line 1143) | public function testDiffForHumansOtherAndNearlyMonth()
method testDiffForHumansOtherAndMonth (line 1150) | public function testDiffForHumansOtherAndMonth()
method testDiffForHumansOtherAndMonths (line 1158) | public function testDiffForHumansOtherAndMonths()
method testDiffForHumansOtherAndNearlyYear (line 1165) | public function testDiffForHumansOtherAndNearlyYear()
method testDiffForHumansOtherAndYear (line 1172) | public function testDiffForHumansOtherAndYear()
method testDiffForHumansOtherAndYears (line 1179) | public function testDiffForHumansOtherAndYears()
method testDiffForHumansOtherAndFutureSecond (line 1186) | public function testDiffForHumansOtherAndFutureSecond()
method testDiffForHumansOtherAndFutureSeconds (line 1193) | public function testDiffForHumansOtherAndFutureSeconds()
method testDiffForHumansOtherAndNearlyFutureMinute (line 1200) | public function testDiffForHumansOtherAndNearlyFutureMinute()
method testDiffForHumansOtherAndFutureMinute (line 1207) | public function testDiffForHumansOtherAndFutureMinute()
method testDiffForHumansOtherAndFutureMinutes (line 1214) | public function testDiffForHumansOtherAndFutureMinutes()
method testDiffForHumansOtherAndNearlyFutureHour (line 1221) | public function testDiffForHumansOtherAndNearlyFutureHour()
method testDiffForHumansOtherAndFutureHour (line 1228) | public function testDiffForHumansOtherAndFutureHour()
method testDiffForHumansOtherAndFutureHours (line 1235) | public function testDiffForHumansOtherAndFutureHours()
method testDiffForHumansOtherAndNearlyFutureDay (line 1242) | public function testDiffForHumansOtherAndNearlyFutureDay()
method testDiffForHumansOtherAndFutureDay (line 1249) | public function testDiffForHumansOtherAndFutureDay()
method testDiffForHumansOtherAndFutureDays (line 1256) | public function testDiffForHumansOtherAndFutureDays()
method testDiffForHumansOtherAndNearlyFutureWeek (line 1263) | public function testDiffForHumansOtherAndNearlyFutureWeek()
method testDiffForHumansOtherAndFutureWeek (line 1270) | public function testDiffForHumansOtherAndFutureWeek()
method testDiffForHumansOtherAndFutureWeeks (line 1277) | public function testDiffForHumansOtherAndFutureWeeks()
method testDiffForHumansOtherAndNearlyFutureMonth (line 1284) | public function testDiffForHumansOtherAndNearlyFutureMonth()
method testDiffForHumansOtherAndFutureMonth (line 1291) | public function testDiffForHumansOtherAndFutureMonth()
method testDiffForHumansOtherAndFutureMonths (line 1298) | public function testDiffForHumansOtherAndFutureMonths()
method testDiffForHumansOtherAndNearlyFutureYear (line 1305) | public function testDiffForHumansOtherAndNearlyFutureYear()
method testDiffForHumansOtherAndFutureYear (line 1312) | public function testDiffForHumansOtherAndFutureYear()
method testDiffForHumansOtherAndFutureYears (line 1319) | public function testDiffForHumansOtherAndFutureYears()
method testDiffForHumansAbsoluteSeconds (line 1326) | public function testDiffForHumansAbsoluteSeconds()
method testDiffForHumansAbsoluteMinutes (line 1334) | public function testDiffForHumansAbsoluteMinutes()
method testDiffForHumansAbsoluteHours (line 1342) | public function testDiffForHumansAbsoluteHours()
method testDiffForHumansAbsoluteDays (line 1350) | public function testDiffForHumansAbsoluteDays()
method testDiffForHumansAbsoluteWeeks (line 1358) | public function testDiffForHumansAbsoluteWeeks()
method testDiffForHumansAbsoluteMonths (line 1366) | public function testDiffForHumansAbsoluteMonths()
method testDiffForHumansAbsoluteYears (line 1374) | public function testDiffForHumansAbsoluteYears()
method testDiffForHumansWithOptions (line 1382) | public function testDiffForHumansWithOptions()
method testDiffForHumansWithMagicMethods (line 1404) | public function testDiffForHumansWithMagicMethods()
method testDiffForHumansWithShorterMonthShouldStillBeAMonth (line 1445) | public function testDiffForHumansWithShorterMonthShouldStillBeAMonth()
method testDiffForHumansWithDateTimeInstance (line 1452) | public function testDiffForHumansWithDateTimeInstance()
method testDiffForHumansWithDateString (line 1459) | public function testDiffForHumansWithDateString()
method testDiffForHumansWithDateTimeString (line 1465) | public function testDiffForHumansWithDateTimeString()
method testDiffWithString (line 1471) | public function testDiffWithString()
method testDiffWithDateTime (line 1479) | public function testDiffWithDateTime()
method testDiffOptions (line 1487) | public function testDiffOptions()
method testDiffForHumansArrayParameter (line 1627) | public function testDiffForHumansArrayParameter()
method testFromNow (line 1678) | public function testFromNow()
method testFromNowBackwardCompatibleSyntax (line 1690) | public function testFromNowBackwardCompatibleSyntax()
method testFrom (line 1699) | public function testFrom()
method testSince (line 1713) | public function testSince()
method testToNow (line 1727) | public function testToNow()
method testTo (line 1739) | public function testTo()
method testUntil (line 1753) | public function testUntil()
method testDiffWithInvalidType (line 1767) | public function testDiffWithInvalidType()
method testDiffWithInvalidObject (line 1774) | public function testDiffWithInvalidObject()
method testDiffForHumansWithIncorrectDateTimeStringWhichIsNotACarbonInstance (line 1781) | public function testDiffForHumansWithIncorrectDateTimeStringWhichIsNot...
method testFloatDiff (line 1790) | public function testFloatDiff()
method testDiffDayMinusOneMicrosecond (line 1842) | public function testDiffDayMinusOneMicrosecond()
method testFloatDiffWithRealUnits (line 1863) | public function testFloatDiffWithRealUnits()
method testFloatDiffWithUTCUnits (line 1928) | public function testFloatDiffWithUTCUnits()
method testPhpBug77007 (line 1997) | public function testPhpBug77007()
method testPHPBug80974 (line 2037) | public function testPHPBug80974()
method testThreeMonthMinusOneDay (line 2045) | public function testThreeMonthMinusOneDay()
method testDiffWithZeroAndNonZeroMicroseconds (line 2062) | public function testDiffWithZeroAndNonZeroMicroseconds()
method testNearlyFullDayDiffInSeconds (line 2075) | public function testNearlyFullDayDiffInSeconds()
method testNearlyFullDayDiffInMicroseconds (line 2083) | public function testNearlyFullDayDiffInMicroseconds()
method testExactMonthDiffInSeconds (line 2091) | public function testExactMonthDiffInSeconds()
method testDiffInUnit (line 2099) | public function testDiffInUnit()
method testDiffInUnitException (line 2105) | public function testDiffInUnitException()
method testDaysDiffPreservation (line 2112) | public function testDaysDiffPreservation()
method testDiffWithTimezones (line 2144) | public function testDiffWithTimezones()
method testBigGapInDays (line 2190) | public function testBigGapInDays()
method testAFormat (line 2214) | public function testAFormat()
FILE: tests/Carbon/Exceptions/BadComparisonUnitExceptionTest.php
class BadComparisonUnitExceptionTest (line 17) | class BadComparisonUnitExceptionTest extends AbstractTestCase
method testComparisonUnitException (line 19) | public function testComparisonUnitException(): void
FILE: tests/Carbon/Exceptions/BadFluentConstructorExceptionTest.php
class BadFluentConstructorExceptionTest (line 17) | class BadFluentConstructorExceptionTest extends AbstractTestCase
method testBadFluentConstructorException (line 19) | public function testBadFluentConstructorException(): void
FILE: tests/Carbon/Exceptions/BadFluentSetterExceptionTest.php
class BadFluentSetterExceptionTest (line 17) | class BadFluentSetterExceptionTest extends AbstractTestCase
method testBadFluentSetterException (line 19) | public function testBadFluentSetterException(): void
FILE: tests/Carbon/Exceptions/ImmutableExceptionTest.php
class ImmutableExceptionTest (line 17) | class ImmutableExceptionTest extends AbstractTestCase
method testImmutableException (line 19) | public function testImmutableException(): void
FILE: tests/Carbon/Exceptions/InvalidCastExceptionTest.php
class InvalidCastExceptionTest (line 17) | class InvalidCastExceptionTest extends AbstractTestCase
method testInvalidCastException (line 19) | public function testInvalidCastException(): void
FILE: tests/Carbon/Exceptions/InvalidDateExceptionTest.php
class InvalidDateExceptionTest (line 17) | class InvalidDateExceptionTest extends AbstractTestCase
method testInvalidCastException (line 19) | public function testInvalidCastException(): void
FILE: tests/Carbon/Exceptions/InvalidFormatExceptionTest.php
class InvalidFormatExceptionTest (line 17) | class InvalidFormatExceptionTest extends AbstractTestCase
method testInvalidFormatException (line 19) | public function testInvalidFormatException(): void
FILE: tests/Carbon/Exceptions/InvalidIntervalExceptionTest.php
class InvalidIntervalExceptionTest (line 17) | class InvalidIntervalExceptionTest extends AbstractTestCase
method testInvalidIntervalException (line 19) | public function testInvalidIntervalException(): void
FILE: tests/Carbon/Exceptions/InvalidPeriodDateExceptionTest.php
class InvalidPeriodDateExceptionTest (line 17) | class InvalidPeriodDateExceptionTest extends AbstractTestCase
method testInvalidPeriodDateException (line 19) | public function testInvalidPeriodDateException(): void
FILE: tests/Carbon/Exceptions/InvalidPeriodParameterExceptionTest.php
class InvalidPeriodParameterExceptionTest (line 17) | class InvalidPeriodParameterExceptionTest extends AbstractTestCase
method testInvalidPeriodParameterException (line 19) | public function testInvalidPeriodParameterException(): void
FILE: tests/Carbon/Exceptions/InvalidTimeZoneExceptionTest.php
class InvalidTimeZoneExceptionTest (line 17) | class InvalidTimeZoneExceptionTest extends AbstractTestCase
method testInvalidTimeZoneException (line 19) | public function testInvalidTimeZoneException(): void
FILE: tests/Carbon/Exceptions/InvalidTypeExceptionTest.php
class InvalidTypeExceptionTest (line 17) | class InvalidTypeExceptionTest extends AbstractTestCase
method testInvalidTypeException (line 19) | public function testInvalidTypeException(): void
FILE: tests/Carbon/Exceptions/NotACarbonClassExceptionTest.php
class NotACarbonClassExceptionTest (line 17) | class NotACarbonClassExceptionTest extends AbstractTestCase
method testNotACarbonClassException (line 19) | public function testNotACarbonClassException(): void
FILE: tests/Carbon/Exceptions/NotAPeriodExceptionTest.php
class NotAPeriodExceptionTest (line 17) | class NotAPeriodExceptionTest ex
Copy disabled (too large)
Download .json
Condensed preview — 2034 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (14,710K chars).
[
{
"path": ".editorconfig",
"chars": 234,
"preview": "root = true\n\n[*]\ncharset = utf-8\nend_of_line = lf\ninsert_final_newline = true\nindent_style = space\nindent_size = 4\ntrim_"
},
{
"path": ".gitattributes",
"chars": 722,
"preview": "/.editorconfig export-ignore\n/.gitattributes export-ignore\n/.github export-ignore\n/.g"
},
{
"path": ".github/FUNDING.yml",
"chars": 79,
"preview": "github: kylekatarnls\nopen_collective: Carbon\ntidelift: packagist/nesbot/carbon\n"
},
{
"path": ".github/ISSUE_TEMPLATE/bug_report.md",
"chars": 900,
"preview": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: bug\nassignees: kylekatarnls\n\n---\n\n**Des"
},
{
"path": ".github/ISSUE_TEMPLATE.md",
"chars": 2887,
"preview": "<!--\n 🛑 Important notice to read.\n\n Before anything else, please search in previous issues (both open and close):\n"
},
{
"path": ".github/dependabot.yml",
"chars": 199,
"preview": "version: 2\nupdates:\n - package-ecosystem: composer\n directory: /\n schedule:\n interval: weekly\n\n - package-e"
},
{
"path": ".github/workflows/deploy-documentation.yml",
"chars": 1633,
"preview": "name: Deploy Documentation\n\non:\n schedule:\n - cron: '0 0 * * *'\n\n # Allows you to run this workflow manually from t"
},
{
"path": ".github/workflows/documentation.yml",
"chars": 1744,
"preview": "name: Documentation\n\non:\n schedule:\n - cron: '0 0 15 * *'\n - cron: '0 0 2 * *'\n\n # Allows you to run this workfl"
},
{
"path": ".github/workflows/laravel.yml",
"chars": 3260,
"preview": "name: Laravel\n\non: [ pull_request, push ]\n\njobs:\n ubuntu:\n runs-on: ubuntu-latest\n\n services:\n memcached:\n "
},
{
"path": ".github/workflows/phpcs.yml",
"chars": 446,
"preview": "name: PHP-CS-Fixer\n\non: [ pull_request, push ]\n\njobs:\n lint:\n name: PHP-CS-Fixer\n\n runs-on: ubuntu-latest\n\n st"
},
{
"path": ".github/workflows/phpmd.yml",
"chars": 1057,
"preview": "name: PHPMD\n\non: [ pull_request, push ]\n\njobs:\n ubuntu:\n name: PHPMD\n\n runs-on: ubuntu-latest\n\n strategy:\n "
},
{
"path": ".github/workflows/phpstan.yml",
"chars": 1615,
"preview": "name: PHPStan\n\non: [ pull_request, push ]\n\njobs:\n ubuntu:\n name: PHPStan\n\n runs-on: ubuntu-latest\n\n strategy:\n"
},
{
"path": ".github/workflows/sponsors.yml",
"chars": 1720,
"preview": "name: Sponsors\n\non:\n schedule:\n - cron: '0 0 15 * *'\n - cron: '0 0 2 * *'\n\n # Allows you to run this workflow ma"
},
{
"path": ".github/workflows/tests.yml",
"chars": 5274,
"preview": "name: Tests\n\non: [ pull_request, push ]\n\njobs:\n tests:\n strategy:\n fail-fast: false\n matrix:\n os: ["
},
{
"path": ".gitignore",
"chars": 183,
"preview": ".idea\n.vscode\n*.iml\n.php-cs-fixer.php\n.php-cs-fixer.cache\nvendor\ncomposer.phar\ncomposer.lock\ncoverage.xml\ncoverage\nphpun"
},
{
"path": ".php-cs-fixer.dist.php",
"chars": 3027,
"preview": "<?php\n\nuse PhpCsFixer\\Config;\nuse PhpCsFixer\\Finder;\n\n$header = <<<'EOF'\nThis file is part of the Carbon package.\n\n(c) B"
},
{
"path": ".phpstorm.meta.php",
"chars": 989,
"preview": "<?php\nnamespace PHPSTORM_META {\n registerArgumentsSet(\"date_units\", \"millenania\", \"millennium\", \"century\", \"centuries"
},
{
"path": ".styleci.yml",
"chars": 94,
"preview": "preset: psr2\n\n# Disabled, moved in .github/workflows/phpcs.yml\nfinder:\n exclude:\n - \"src\"\n"
},
{
"path": "LICENSE",
"chars": 1052,
"preview": "Copyright (C) Brian Nesbitt\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this softwa"
},
{
"path": "bin/carbon",
"chars": 391,
"preview": "#!/usr/bin/env php\n<?php\n\nuse Carbon\\Cli\\Invoker;\n\n$dir = __DIR__.'/..';\n\nif (!file_exists($dir.'/autoload.php')) {\n "
},
{
"path": "bin/carbon.bat",
"chars": 93,
"preview": "@ECHO OFF\nsetlocal DISABLEDELAYEDEXPANSION\nSET BIN_TARGET=%~dp0/carbon\nphp \"%BIN_TARGET%\" %*\n"
},
{
"path": "build.php",
"chars": 3689,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "codecov.yml",
"chars": 15,
"preview": "comment: false\n"
},
{
"path": "composer.json",
"chars": 3608,
"preview": "{\n \"name\": \"nesbot/carbon\",\n \"description\": \"An API extension for DateTime that supports 281 different languages.\""
},
{
"path": "contributing.md",
"chars": 6647,
"preview": "# Contributing to Carbon\n\n## Issue Contributions\n\nPlease report any security issue using [Tidelift security contact](htt"
},
{
"path": "extension.neon",
"chars": 136,
"preview": "services:\n -\n class: Carbon\\PHPStan\\MacroExtension\n tags:\n - phpstan.broker.methodsClassRefl"
},
{
"path": "lazy/Carbon/MessageFormatter/MessageFormatterMapperStrongType.php",
"chars": 768,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "lazy/Carbon/MessageFormatter/MessageFormatterMapperWeakType.php",
"chars": 1138,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "lazy/Carbon/ProtectedDatePeriod.php",
"chars": 1913,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "lazy/Carbon/TranslatorStrongType.php",
"chars": 1702,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "lazy/Carbon/TranslatorWeakType.php",
"chars": 813,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "lazy/Carbon/UnprotectedDatePeriod.php",
"chars": 378,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "phpdoc.php",
"chars": 31441,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "phpmd.xml",
"chars": 2425,
"preview": "<?xml version=\"1.0\"?>\n<ruleset\n name=\"Mess detection rules for Carbon\"\n xmlns=\"http://pmd.sf.net/ruleset/1.0.0\"\n "
},
{
"path": "phpstan.neon",
"chars": 6489,
"preview": "parameters:\n scanFiles:\n - lazy/Carbon/MessageFormatter/MessageFormatterMapperStrongType.php\n - lazy/Ca"
},
{
"path": "phpunit.xml.dist",
"chars": 2196,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<phpunit\n xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n xsi:noNamespac"
},
{
"path": "psalm.xml",
"chars": 718,
"preview": "<?xml version=\"1.0\"?>\n<psalm\n errorLevel=\"5\"\n resolveFromConfigFile=\"true\"\n xmlns:xsi=\"http://www.w3.org/2001/X"
},
{
"path": "readme.md",
"chars": 28539,
"preview": "# Carbon\n\n[](https://pac"
},
{
"path": "sponsors.php",
"chars": 9935,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/AbstractTranslator.php",
"chars": 30538,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Callback.php",
"chars": 3119,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Carbon.php",
"chars": 160416,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/CarbonConverterInterface.php",
"chars": 443,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/CarbonImmutable.php",
"chars": 161482,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/CarbonInterface.php",
"chars": 311816,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/CarbonInterval.php",
"chars": 126249,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/CarbonPeriod.php",
"chars": 91495,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/CarbonPeriodImmutable.php",
"chars": 856,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/CarbonTimeZone.php",
"chars": 9677,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Cli/Invoker.php",
"chars": 960,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Constants/DiffOptions.php",
"chars": 942,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Constants/Format.php",
"chars": 1104,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Constants/TranslationOptions.php",
"chars": 983,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Constants/UnitValue.php",
"chars": 1771,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Exceptions/BadComparisonUnitException.php",
"chars": 942,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Exceptions/BadFluentConstructorException.php",
"chars": 1091,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Exceptions/BadFluentSetterException.php",
"chars": 1080,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Exceptions/BadMethodCallException.php",
"chars": 351,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Exceptions/EndLessPeriodException.php",
"chars": 439,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Exceptions/Exception.php",
"chars": 320,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Exceptions/ImmutableException.php",
"chars": 1043,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Exceptions/InvalidArgumentException.php",
"chars": 353,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Exceptions/InvalidCastException.php",
"chars": 463,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Exceptions/InvalidDateException.php",
"chars": 1387,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Exceptions/InvalidFormatException.php",
"chars": 465,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Exceptions/InvalidIntervalException.php",
"chars": 467,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Exceptions/InvalidPeriodDateException.php",
"chars": 469,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Exceptions/InvalidPeriodParameterException.php",
"chars": 474,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Exceptions/InvalidTimeZoneException.php",
"chars": 467,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Exceptions/InvalidTypeException.php",
"chars": 463,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Exceptions/NotACarbonClassException.php",
"chars": 1228,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Exceptions/NotAPeriodException.php",
"chars": 462,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Exceptions/NotLocaleAwareException.php",
"chars": 956,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Exceptions/OutOfRangeException.php",
"chars": 1987,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Exceptions/ParseErrorException.php",
"chars": 1777,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Exceptions/RuntimeException.php",
"chars": 345,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Exceptions/UnitException.php",
"chars": 456,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Exceptions/UnitNotConfiguredException.php",
"chars": 977,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Exceptions/UnknownGetterException.php",
"chars": 1079,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Exceptions/UnknownMethodException.php",
"chars": 1063,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Exceptions/UnknownSetterException.php",
"chars": 1077,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Exceptions/UnknownUnitException.php",
"chars": 929,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Exceptions/UnreachableException.php",
"chars": 431,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Exceptions/UnsupportedUnitException.php",
"chars": 570,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Factory.php",
"chars": 46128,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/FactoryImmutable.php",
"chars": 25335,
"preview": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.c"
},
{
"path": "src/Carbon/Lang/aa.php",
"chars": 334,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/aa_DJ.php",
"chars": 1564,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/aa_ER.php",
"chars": 1060,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/aa_ER@saaho.php",
"chars": 1064,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/aa_ET.php",
"chars": 1051,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/af.php",
"chars": 2671,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/af_NA.php",
"chars": 1094,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/af_ZA.php",
"chars": 267,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/agq.php",
"chars": 1199,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/agr.php",
"chars": 335,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/agr_PE.php",
"chars": 1610,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ak.php",
"chars": 334,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ak_GH.php",
"chars": 1388,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/am.php",
"chars": 334,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/am_ET.php",
"chars": 1623,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/an.php",
"chars": 334,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/an_ES.php",
"chars": 1737,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/anp.php",
"chars": 335,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/anp_IN.php",
"chars": 1033,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ar.php",
"chars": 3940,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ar_AE.php",
"chars": 1639,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ar_BH.php",
"chars": 1638,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ar_DJ.php",
"chars": 297,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ar_DZ.php",
"chars": 3893,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ar_EG.php",
"chars": 1638,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ar_EH.php",
"chars": 297,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ar_ER.php",
"chars": 297,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ar_IL.php",
"chars": 297,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ar_IN.php",
"chars": 956,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ar_IQ.php",
"chars": 1699,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ar_JO.php",
"chars": 1699,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ar_KM.php",
"chars": 297,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ar_KW.php",
"chars": 4549,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ar_LB.php",
"chars": 1699,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ar_LY.php",
"chars": 3521,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ar_MA.php",
"chars": 3884,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ar_MR.php",
"chars": 297,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ar_OM.php",
"chars": 1638,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ar_PS.php",
"chars": 962,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ar_QA.php",
"chars": 1638,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ar_SA.php",
"chars": 4535,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ar_SD.php",
"chars": 1638,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ar_SO.php",
"chars": 297,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ar_SS.php",
"chars": 992,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ar_SY.php",
"chars": 1699,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ar_Shakl.php",
"chars": 4211,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ar_TD.php",
"chars": 297,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ar_TN.php",
"chars": 3869,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ar_YE.php",
"chars": 1608,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/as.php",
"chars": 334,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/as_IN.php",
"chars": 1699,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/asa.php",
"chars": 1089,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ast.php",
"chars": 1955,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ast_ES.php",
"chars": 268,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ayc.php",
"chars": 335,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ayc_PE.php",
"chars": 1009,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/az.php",
"chars": 3974,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/az_AZ.php",
"chars": 729,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/az_Arab.php",
"chars": 1625,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/az_Cyrl.php",
"chars": 820,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/az_IR.php",
"chars": 1570,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/az_Latn.php",
"chars": 1072,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/bas.php",
"chars": 1250,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/be.php",
"chars": 7403,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/be_BY.php",
"chars": 852,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/be_BY@latin.php",
"chars": 994,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/bem.php",
"chars": 335,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/bem_ZM.php",
"chars": 1722,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ber.php",
"chars": 335,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ber_DZ.php",
"chars": 993,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ber_MA.php",
"chars": 993,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/bez.php",
"chars": 1278,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/bg.php",
"chars": 3534,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/bg_BG.php",
"chars": 267,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/bhb.php",
"chars": 335,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/bhb_IN.php",
"chars": 997,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/bho.php",
"chars": 335,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/bho_IN.php",
"chars": 1650,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/bi.php",
"chars": 334,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/bi_VU.php",
"chars": 1917,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/bm.php",
"chars": 2451,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/bn.php",
"chars": 5126,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/bn_BD.php",
"chars": 1017,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/bn_IN.php",
"chars": 1052,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/bo.php",
"chars": 2880,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/bo_CN.php",
"chars": 267,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/bo_IN.php",
"chars": 1481,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/br.php",
"chars": 2787,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/br_FR.php",
"chars": 267,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/brx.php",
"chars": 335,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/brx_IN.php",
"chars": 1064,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/bs.php",
"chars": 3440,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/bs_BA.php",
"chars": 267,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/bs_Cyrl.php",
"chars": 1089,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/bs_Latn.php",
"chars": 297,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/byn.php",
"chars": 335,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/byn_ER.php",
"chars": 998,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ca.php",
"chars": 4502,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ca_AD.php",
"chars": 297,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ca_ES.php",
"chars": 267,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ca_ES_Valencia.php",
"chars": 593,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ca_FR.php",
"chars": 297,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ca_IT.php",
"chars": 297,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ccp.php",
"chars": 1323,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ccp_IN.php",
"chars": 323,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ce.php",
"chars": 334,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ce_RU.php",
"chars": 1563,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/cgg.php",
"chars": 1271,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/chr.php",
"chars": 335,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/chr_US.php",
"chars": 1725,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/ckb.php",
"chars": 4073,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/cmn.php",
"chars": 335,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/cmn_TW.php",
"chars": 1419,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
},
{
"path": "src/Carbon/Lang/crh.php",
"chars": 335,
"preview": "<?php\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full cop"
}
]
// ... and 1834 more files (download for full content)
About this extraction
This page contains the full source code of the briannesbitt/Carbon GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 2034 files (13.6 MB), approximately 3.7M tokens, and a symbol index with 5659 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.