COURSE of the MONTH

How to prorate a yearly subscription

Hello Experts!

I'm creating a subscription-based calculator in Java and I'm trying to figure out how to correctly prorate the value if the subscription.
My yearly subscription fee is a flat $120 per year (365 days). If a user wants only a 6 month subscription then the cost is $60. But let's say the subscriber signs on Jan. 15, 2011 and ends his subscription on June 30. That's only 5 months and 15 days. I need a formula that can correctly calculate the amount I need to charge. In this case it would be ~$55.00. It gets a little trickier if my user signs on Feb. 6th and ends their subscription Dec. 28.
Can anyone help?

As CEHJ has pointed out it is easier to calc the daily amount, then multiply by the number of days.
Obviously the amount per day is fuzzy due to leap years, so one month in July could cost just fractionally less on a leap year.

days in year = 1/1/next - 1/1/current
days subscribed = last - first + 1
amount to pay = days subscribed / days in year * $120

All - thank so so much for your solutions. I do have one caveat. What if a user starts their subscription on Feb.15, 2010 and ends their subscription March 15. Really, I should charge the user $10 since it's one month but with the formula given:
days * PER_YEAR / 365
That would be:
29 *120 / 365 = 9.53

I guess for situations like this I would have to write a separate condition to calculate something like this?

Notes:
It is possible to have 3 months 30 days which is 1 day less than 4 months in some cases, but you will charge 4 months exactly.
It is also possible to charge 27 days in feb (27/28) at 27/30 of the monthly rate.
Give some take some.