php - Carbon::now() - only month -


i couldn't find anywhere in documentation how show current year or month carbon?

when write this:

carbon\carbon::now('m');

it gives me whole time stamp, need month

like

date('m'); 

but must carbon!

how can achieve this?

$now = carbon::now(); echo $now->year; echo $now->month; echo $now->weekofyear; 

Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -