Use inWholeDays property instead or convert toDouble(DAYS) if a double value is required.
toDouble(DurationUnit.DAYS)
The value of this duration expressed as a Double number of days.