Validate number of days in a given month

前端 未结 13 2226
独厮守ぢ
独厮守ぢ 2021-01-31 18:14

Performance is of the utmost importance on this one guys... This thing needs to be lightning fast!


How would you validate the number of days in a given mont

13条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-31 18:24

    You can use DateTime to solve this:

    new DateTime('20090901')->format('t'); // gives the days of the month
    

提交回复
热议问题