Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

dmcglone's avatar

list of carbon options

A few weeks ago I was learning how to use carbon and I had a website or It may have been on github, a list of options for carbon and somehow I lost the site. I have looked and looked and I can't find it. Does anyone know of a site that shows this list of options?

0 likes
10 replies
dmcglone's avatar

I went there, but can't find the list of switches, like removing the the zero in a single digit month. I know 'm' displays "04" and 'M' displays "Apr".

mstnorris's avatar
Level 55

@dmcglone it should just follow normal PHP DateTime variables,

in this case it will be n

see the docs

2 likes
dmcglone's avatar

There it is.. Thank you. That's exactly the doc I was reading a week or so ago and today I was searching php.net, but for some reason I was looking for carbon. :-/

mstnorris's avatar

@dmcglone Carbon is essentially just a nice wrapper around the PHP DateTime functions. Glad I could help.

1 like
dmcglone's avatar

Yeah, and I don't know why I wasn't thinking right. I was looking for the list so I could print it out and hang it on my cork board to keep it handy quickly, so while I'm learning I don't go off on a tangent.

dmcglone's avatar

@gregrobson I copied and pasted it into Libre Office and made it look all nice and neat and hung it on my cork board. :-)

1 like

Please or to participate in this conversation.