Carbon display age in years, months, day

Posted 3 years ago by polarcubs


I know this is more of a Carbon question rather than a Laravel question.

Well. I was trying to display a user age in years, months and days (12 years, 7 months and 22 days old). However Carbon age method only return the years. I want something more precise.

What would be a good way to do it?

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.