I would like to calculate a a rate by returning the value to be multiplied by as a big decimal.
The relevant snippet of code below works:
Duration d1 = new Duration (startD, endD);
BigDecimal dur = new BigDecimal("0.00");
dur.setScale(2, RoundingMode.HALF_UP);
dur = dur.add(new BigDecimal(d1.getStandardMinutes()/60));
return dur;
However, All I get is an integer without the scale.
I think what you want is