def to_min(datetime):
    """
    Converts a datetime to an int representation in minutes. To do the reverse
    use: min_to_datetime.

    Parameters
    ----------
    datetime : datetime.datetime
        Represents a datetime in datetime"s format.

    Returns
    -------
    minutes : int
        Represents minutes from.

    Examples
    --------
    """
    minutes = int((datetime - datetime.utcfromtimestamp(0)).total_seconds() /
        60)
    return minutes
