How to check time interval for presence of 31st of January of any year : Trying to make 30 days in 31 days months.
I made code, but it checks only current date, when I use (from:, to:) it counts difference, but not checking the time interval.

    let componentsForStatement = calendar.dateComponents([.day, .month], from: currentDateDay)
    if ((componentsForStatement.month == 01) || (componentsForStatement.month == 03) || (componentsForStatement.month == 05) || (componentsForStatement.month == 07) || (componentsForStatement.month == 08) || (componentsForStatement.month == 10) || (componentsForStatement.month == 12)) && componentsForStatement.day == 31 {
       daysPassed -= 1}