본인 코드 중 한 부분을 가져왔다
//자를 문자열
let str = nowData.text
//자를 문자열 시작점(!는 위에 nil값일 수 있어서)
let hourStartIndex = str!.index(str!.startIndex, offsetBy: 0)
//자를 문자열 마지막 지점
let hourEndIndex = str!.index(str!.startIndex, offsetBy: 2)
//자르고 변수에 넣어주기
let hourString = str![hourStartIndex ..< hourEndIndex]
파이썬은 array[1:3] 이런식으로 가능해서 편했는데 Swift는 이런식으로 하는 듯!