Get week number (in the year) from a date PHP

前端 未结 17 2079
星月不相逢
星月不相逢 2020-11-27 14:54

I want to take a date and work out its week number.

So far, I have the following. It is returning 24 when it should be 42.



        
17条回答
  •  无人及你
    2020-11-27 15:31

    Just as a suggestion:

    
    

    Might be a little simpler than all that lot.

    Other things you could do:

    
    
    

提交回复
热议问题