Considering beer goes through a second (much smaller) fermentation and a conditioning phase after bottling I'd say it doesn't matter how long it's been in primary (or secondary), you're still starting the clock over as soon as you bottle.
Technically, I believe wort turns into beer the second you pitch yeast. However, I think most would consider the born on date to refer to time of packaging
I actually asked this question when I was at the AB Brewery in St. Louis in 2000. One of the chemical engineers told us that the machine that applied the born on date to the cans was right after (before?) the machine where the beer was steam pasteurized on the assemby line.
My smart azz spoke up and said something to the effect of "so it's really the died on date of the nutrients in the beer." No one laughed except the chemical engineer.
Dont forget,they confuse you with bestby dates also. Sometimes they just put a date,and your like, What the ef? How do I? Who?What the,Why? oh why? I'm scared. Where do I go,now? Im in the jungle,baby.