How to set the time of the current date to 00:00:00?

后端 未结 0 1626
-上瘾入骨i
-上瘾入骨i 2020-11-28 15:13

I want to get the current date and set the time to 00:00:00. So actually I only need the date. My first approach is:

extension Date {

func startOfDay() ->         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题