A day was a measurement of time that varied in length depending on the planet time was being measured on. On Earth, a day was equal to 24 hours, while on Bajor a day was 26 hours. (DTI novel: Watching the Clock, DS9 episode: "A Man Alone")
Originating as an Earth measure of time by the Human civilization, days were used throughout the Federation. In the year 2285, Captain Spock used a simple code of converting hours to days in order to mislead Khan Noonien Singh, who he suspected was eavesdropping communications. Rear Admiral James T. Kirk correctly ascertained Spock's meaning based on a reference to Saavik's "by the book" behavior of following Starfleet regulations. (TOS movie & novelization: The Wrath of Khan)