I have a LD diary program thing I've created sat on my HD, but I want it to be able to display the moon's current state just by using the time the computer is currently set at.

Is that possible? And if so, how?

Question again, but less computerized:
Is it possible to detemine the current state of the moon (full, waxing, waning, new) from the time? If so, how?