Here you can find the source of calculateDayRate(BigDecimal rate, BigDecimal money)
public static BigDecimal calculateDayRate(BigDecimal rate, BigDecimal money)
//package com.java2s; //License from project: Apache License import java.math.BigDecimal; import java.math.RoundingMode; public class Main { public static BigDecimal calculateDayRate(BigDecimal rate, BigDecimal money) { rate = rate.divide(new BigDecimal(365), 10, RoundingMode.HALF_UP); return rate.multiply(money); }//w w w . j a va 2s .co m }