I want to change the font color using an "if" statement if it meets that criteria. I have tried NSAttributedString and NSMutableAttributedString but cannot find anything to accomplish what I want to do. I am using the print statement to show the for loop is correct. Data for each returned array is 2018, 2018, 3010, 3010, 3614, 3614, 1816, 1816, 1812 and 1812. The reason for duplicate numbers is each axle has 2 tires. The data is broken down with first 2 digits being the week and second 2 digits being the year the tire was manufactured.
Thanks for all help provided. My code is as follows:

```
func updateDOTCodes() {
    let date = Date()
    let dateFormatter = DateFormatter()

    var myDOTTFArray: [String] {
        return [classALFDOTNumber.text!, classARFDOTNumber.text!, classALRDualOutsideDOTNumber.text!, classARRDualOutsideDOTNumber.text!, classALRDualInsideDOTNumber.text!, classARRDualInsideDOTNumber.text!, classALRDualOutsideTagAxleDOTNumber.text!, classARRDualOutsideTagAxleDOTNumber.text!, classALRDualInsideTagAxleDOTNumber.text!, classARRDualInsideTagAxleDOTNumber.text!]
    }

    for counter in 0...myDOTTFArray.count-1 {
        let myString = myDOTTFArray[counter]

        if myString != "" {

            dateFormatter.dateFormat = "YY"
            let yearString = Int(dateFormatter.string(from: date))
            let startIndex = myString.index(myString.startIndex, offsetBy: 2)
            let endIndex = myString.index(myString.endIndex, offsetBy: -2)

            let tireWeek = Int(String(myString.prefix(upTo: startIndex)))
            let tireYear = Int(String(myString.suffix(from: endIndex)))

            if currentWeek >= tireWeek! && yearString! - 5 <= tireYear! {
                print(myString + " Green")
            }

            if currentWeek <= tireWeek! && yearString! - 5 >= tireYear! && yearString! - 7 <= tireYear! {
                print(myString + " Yellow")
                // Insert code here to change myString text to Orange as Yellow does not display well
            }

            if currentWeek >= tireWeek! &&  yearString! - 7 >= tireYear! {
                print(myString + " Red")
                // Insert code here to change myString text to red
            }
        }
    }
}

```