can someone help me shorten my code?

I’m annoyed because I am almost certain there is an easier and shorter way to write this code but I’m not able to figure it out. can anyone help me out?

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class TimeCTRL : MonoBehaviour
{
    public int day;
    public int month;
    public int year;

    public Text daytxt;
    public Text monthtxt;
    public Text yeartxt;

    public Button endturn;


    // Start is called before the first frame update
    void Start()
    {
        day = 1;
        month = 1;
        year = 1;
    }

    // Update is called once per frame
    void Update()
    {
        daytxt.text = "D" + day.ToString();
        monthtxt.text = "M" + month.ToString();
        yeartxt.text = "Y" + year.ToString();
    }

    public void turn()
    {
        day += 1;
        if (month == 1 && day == 31)
        {
            month += 1;
            day = 1;
        }

        else if (month == 2 && day == 28)
        {
            month += 1;
            day = 1;
        }

        else if (month == 3 && day == 31)
        {
            month += 1;
            day = 1;
        }

        else if (month == 4 && day == 30)
        {
            month += 1;
            day = 1;
        }

        else if (month == 5 && day == 31)
        {
            month += 1;
            day = 1;
        }

        else if (month == 6 && day == 30)
        {
            month += 1;
            day = 1;
        }

        else if (month == 7 && day == 31)
        {
            month += 1;
            day = 1;
        }

        else if (month == 8 && day == 31)
        {
            month += 1;
            day = 1;
        }

        else if (month == 9 && day == 30)
        {
            month += 1;
            day = 1;
        }

        else if (month == 10 && day == 31)
        {
            month += 1;
            day = 1;
        }

        else if (month == 11 && day == 30)
        {
            month += 1;
            day = 1;
        }

        else if (month == 12 && day == 31)
        {
            year += 1;
            month = 1;
            day = 1;
        }
    }
}

For calendars that are identical to the real world calendar you can just use System.DateTime.

public void turn()
{
    System.DateTime currentDate = new System.DateTime(year, month, day);
    System.DateTime futureDate = currentDate.AddDays(1);

    day = futureDate.day;
    month = futureDate.month;
    year = futureDate.year;
}

For calendars that are not identical to the real world calendar the way you wrote the code is the simplest approach with anything more complex needing justification to be written (eg will you be using multiple different calendars). I wouldn’t worry about shortening it for non-standard calendars. You won’t see a performance difference and it’s already readable.

If you want to keep the rough idea of the code as an exercise or something (instead of replacing it with System.DateTime), you can consider making an array indexed by month which holds the length of those months

int monthLength = MonthLengths[month];
if (day >= monthLength) {
month += 1;
day = 1;
}
if (month == 13) {
month = 1;
year += 1;
}

(note that this array would be one-indexed, so like [ 0, 31, 28, 31 , … ] )