How to estimate number of hours remaining before battery dies?

I too want to be able to display something on my project before the battery completely dies off...

How does one "measure the voltage" programmatically within the sketch?

Is there some way to do this without adding a transistor?

Great ideas here... thanks!