sarah peters wrote:. . . I know you use the GregorianCalendar class . . .
No, you don't. Not any more. At long last, Java8 has introduced
date and time classes that actually have a decent public interface. Forget about those abominations Date and Calendar.
What about setting a field for last date when interest was calculated? What about some sort of method which tests whether it is more than a month since you last calculated interest? You might consider a
Timer object to fire such a method, but Timers don't work by calendar; they work by milliseconds, so they can't even absolutely accurately calculate a day (because of leap seconds).