Swift - Integer conversion to Hours/Minutes/Seconds

后端 未结 23 1237
無奈伤痛
無奈伤痛 2020-11-28 01:47

I have a (somewhat?) basic question regarding time conversions in Swift.

I have an integer that I would like converted into Hours / Minutes / Second

23条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-28 02:12

    Another way would be convert seconds to date and take the components i.e seconds, minutes and hour from date itself. This solution has limitation only till 23:59:59

提交回复
热议问题