This does not answer your question how to calculate height, but it solves your problem of repeating your goal on top of th epage:
If the date is in a html <table> and you want to repeat the caption on each page, you should put it into a row of its own in a <thead>