"Once upon a time..." & "...happily ever after." Who coined 'em? Those Grimm

These two fairy taleisms really are lovely little turns of phrase. But who came up with them? And were they first coined in the same story?

Akkk. The title should read:

… Who coined 'em. Those Grimm guys?

In China they say: “Aiyyyeee! Come, spread ears like elephants and hear the tale of…”

In the Middle East:" Once there was a one, only Allah is unique…"

One thing I can say for sure is that it certainly wasn’t the Brothers Grimm. For one they were German, so that wouldn’t have much to do with an English formula; for another, they didn’t write any stories, they merely collected and published them.

The usual way to start a German fairy tale is “There was once …” and for endings, it’s not uncommon to have " And if they are not dead, then they are living still."

This thread reminds me of an Onion non-article (my term for the little pics with captions that appear in the sidebar on the front page). “German Fairy Tale Ends Predictibly”, with a pic of children being boiled alive by a witch outside of a house made of candy.

This page has links to 209 stories collected in Grimm’s Fairy Tales based on the 1884 translation by Margaret Hunt.

[A supposedly more accurate translation appears here.]

Clicking on the stories will quickly produce a number of tales that start with “There was once upon a time …”

The tale “Brother and Sister” ends with, “so the sister and brother lived happily together all their lives.”

And “Repunzel” begins with “There were once a man and a woman” and ends with “and they lived for a long time afterwards, happy and contented.”

It appears that the Grimms did edit their collection so that these now-classic formulas are used in some variants. I can’t say how much farther back the formulas go.

The OED provides at least a starting point.

There’s part one of the question.

Part the two.

There is the phrase “happy as the day is long” from 1786. That phrase appears again in print in 1823. The first use of the phrase “living very happy ever after” is found in 1853. Tellingly, we find

that the phrase was well-known as a fairy tale cliche by that point.
[All cites from the OED ]

I suspect it’s proverbial; there’s also a variation of it in Shakespeare’s Much Ado About Nothing, 2.1.46:

“So deliver I up my apes and away to St. Peter – for the Heavens. He shows me where the bachelors sit, and there live we as merry as the day is long.”

Hans Christian Anderson says in his stories that he heard it at the end of a natural telephone line, that is from a sparrow who heard it from a tree, etc.