Convert month number to month short name

后端 未结 6 804
无人及你
无人及你 2020-12-11 16:26

I have a variable with the following value

$month = 201002; 

the first 4 numbers represent the year, and the last 2 numbers represent the m

6条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-11 16:57

    $mydate = "201002";
    date('M', mktime(0, 0, 0, substr($mydate, 4, 2), 1, 2000)); 
    

提交回复
热议问题