Using the definite article "THE" makes the noun more particular or individual.
For example, "I finished THE book, means you finished a particular book.
Using the indefinite articles "A" or "AN" gives the noun less uniqueness
Saying, " I finished A book" could mean any book.
For your sentence, it would be normal to say "The day was coming to AN end" since it is a normal thing for all days to end.
However, if you were talking about a particular day, perhaps the last day of your vacation, you could say,
"I didn't want THE day to end".
Hope this helps