/**
  * Calculates the number of days spanned in a period assuming 365 days per year, 30 days per
  * month, 7 days per week, 24 hours per day, 60 minutes per hour and 60 seconds per minute.
  *
  * @param period A period to retrieve the number of standard days for
  * @return The number of days spanned by the period.
  */
 protected static int getDaysInPeriod(final Period period) {
   int totalDays = 0;
   Period temp = new Period(period);
   if (period.getYears() > 0) {
     int years = period.getYears();
     totalDays += 365 * years;
     temp = temp.minusYears(years);
   }
   if (period.getMonths() > 0) {
     int months = period.getMonths();
     totalDays += 30 * period.getMonths();
     temp = temp.minusMonths(months);
   }
   return totalDays + temp.toStandardDays().getDays();
 }