Working with NSDate components in Swift

后端 未结 4 473
梦毁少年i
梦毁少年i 2021-02-08 04:19

I have a date that I need to split in some components. for example

let components = NSCalendarUnit.CalendarUnitDay | NSCalendarUnit.CalendarUnitHour
let date = c         


        
4条回答
  •  春和景丽
    2021-02-08 04:44

    Not sure which you want, but there are weekday, weekdayOrdinal, weekOfMonth and weekOfYear. (week has been deprecated.)

提交回复
热议问题