2 Samuel 3:35

And when all the people came to cause David to eat meat while it was yet day, David sware, saying, So do God to me, and more also, if I taste bread, or ought else, till the sun be down.

David bound himself by oath to taste no bread nor anything else until the sun went down, refusing all food while it was still day as he mourned Abner's death. All the people came to persuade him to eat while it was yet day, but their invitation did not end his fast. His fast was public and marked the depth and sincerity of his grief over Abner. By that public fasting he made clear that he had neither desired nor connived in Abner's murder.

The going down of the sun is the coming of evening, identifying evening with sunset and showing that evening begins at sunset. David's oath to eat nothing till the sun be down treats sunset as the end of the time of abstinence and as the point at which evening had come. Sunset ends the daylight part of the day and is the boundary where one day ends and the next begins, so each day begins and ends at sunset.