def day_of_week(rdate):
    """Get the ordinal day of the week.

    Parameters
    ----------
    rdate : int
        RDate date format.

    Returns
    -------
    dw : int
        Ordinal day of the week.
    """
    dw = rdate % 7
    return dw
