Problem with accessing data

I have a strategy game with TimeManager script and GameDate struct. GameDate struct only stores three different values for day, month and year and TimeManager will create on GameDate and store as its main date and increment its value in time steps - this is done in an Update method.
Time Manager also has an IEnumerator method called WaitOneDay where the program does nothing for one day - I thought this will be used in army script when they are moving so that they can only do some part and after one day, they might do it again and so on until they are done with their job.

But whenever I try to start the WaitOneDay method, the main date returns 0 (even though that cannot be in the value - it’s a date) and therefore I cannot do anything with the WaitOneDay method. When I try to access data from the GameDate in different methods, everything is working okay - DateDistance method works fine and accesses every data normally (they are supposed to return number of days between two dates - what I do is create DateTime and put mainDate attributes into it and then create other DateTime and fill it with other GameDate - then simply call DateTime.TotalDays.

The problem is not accessing the methods (Debug.Log is telling me he got into the method but returns a wrong value of day).

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

public class TimeManager : MonoBehaviour
    [SerializeField] public GameDate mainDate;
    [SerializeField] private Text mainDateText;

    [SerializeField] private float[] timeSpeed;
    [SerializeField] private int timeStep;
    [SerializeField] private float time;

    [SerializeField] private bool stopTime = false;
    [SerializeField] private bool leapYear = false;

    private void Awake()
        timeStep = 0;
        mainDate = new GameDate(20, 1, 1594);

        mainDateText = transform.GetComponent<Text>();

    public int DateDistance(GameDate endDate)
        DateTime s = new DateTime(mainDate.Y, mainDate.M + 1, mainDate.D);
        DateTime e = new DateTime(endDate.Y, endDate.M + 1, endDate.D);

        return (int)((s.Date - e.Date).TotalDays * -1);

    public IEnumerator WaitOneDay()
        var currentDay = mainDate.D;
        while (currentDay == mainDate.D)

        yield return null;

This is the TimeManager class that have WaitOneDay method. You can see that I am accessing the mainDate.D in the DateDistance method which is working perfectly fine. There of course are methods to add one day and so on but they are not important.

public struct GameDate
    public int D;
    public int M;
    public int Y;

    public GameDate(int D, int M, int Y)
        this.D = D;
        this.M = M;
        this.Y = Y;

This is the GameDate struct that I use - one date is mainDate and tells you what date currently is. I might want to use this to save birthday of characters or expiration of truce and so on.

    private void Update()
        if (Route.ActiveRoute())
    private void OnTheMove()
        Debug.Log("one day has passed");

And this is method in the Army class that checks if Army has any movement orders and if so, they execute it (there would be code in the OnTheMove method). Every army has access to TimeManager - I can get into the WaitOneDay method, I just cannot make it work properly.