Best guess -- Bruce was Batman for 5 or 6 years before retirement, and another six months or so between unretiring and "death".
Short version ...
- Bruce leaves Gotham at 21, returns to don the cowl in 2003 at 28yo ... has about 2-years between return/first night and LOS attack;
- League of Shadows attack on Gotham occurs in 2005 on his 30th birthday;
- three year off-screen war on crime;
- events of The Dark Knight occur in 2008, Bruce is 33;
- retirement in 2008 or 2009 after Dent's death;
- eight year gap;
- Events of The Dark Knight Rises, Bruce is 41.
Here's my guess on the longer timeline (which is mostly stolen from somebody else), and the reasoning (based on college, birthdates, death date of parents, age of Jimmy Gordon, and references to timelines) ...
1972 or 1973 – Bruce Wayne is born.
November 8, 1983 – Thomas and Martha Wayne are murdered. Bruce is 10-or-11 at the time. (According to the “casefile” on the Wayne murders from The Dark Knight Manual).
1996 – Joe Chill paroled. Bruce Wayne leaves Gotham. He is a 21-year-old student at Princeton.
2003 – Bruce returns to Gotham after his 7-year training. Bruce is 28-years-old. Batman’s first night out occurs.
- Jim Gordon’s son is two-years-old during Batman’s first year out.
2005 –Ras Al Ghul’s hallucinogen attack on Gotham City. This occurs the night of Bruce Wayne’s 30th Birthday Party.
2005-2008 – Offscreen, Bruce wages his War on Crime.
2008 – The events of The Dark Knight. Bruce is 33-years-old. (Date stamp on the Joker Bank picture says 2008)
- Joker’s “A year ago …” line isn’t referencing the emergence of Batman, but the time when the mob lost control of the city after the chaos of Ras Al Ghul.
- This explains why The Dark Knight Manual references Wayne using the original suit for 5-years … from 2003 to 2008.
- During this time, the Joker rises -- committing random crimes (which is why the bank robbers at the beginning have already heard of him).
- Jim Gordon’s son is about eight-years-old during the Harvey Dent kidnapping.
2008/2009 – Batman retires. It is unclear whether he completely retires right away, or whether the Harvey Dent incident is just “the last confirmed sighting”. I like the idea of "unconfirmed" sightings for a year or so after. If he retires right away, 2008. I like the idea of the actual retirement coming in 2009, though. Either way, eventually, he completely retires.
[eight year gap]
2016-2017 – the events of The Dark Knight Rises. Bruce is 41-years-old.
Bruce was Batman from 2003 to 2008/9, and again in 2016. This leaves off-screen gaps for Bruce-as-Batman during Batman Begins (since there are two-years between him first donning the cowl, and him taking down Ras); 3-years between Begins and TDK; and possibly another year between TDK and retirement.
KBZ