Gets the seconds difference.

@param startDate the start date
@param endDate   the end date
@return the seconds difference
320890
public static long getSecondsDifference(Date startDate, Date endDate) {
		long startTime = startDate.getTime();
		long endTime = endDate.getTime();
		long diffTime = endTime - startTime;
		long diffInSeconds = TimeUnit.MILLISECONDS.toSeconds(diffTime);
		return diffInSeconds;
	}
724054
public static function initDatesInRange($start_date, $end_date, $daysDifference = 1){
        $dates_in_range = [];
        $begin = new DateTime($start_date);
        $end = new DateTime($end_date);
        $endModify = $end->modify( '+'.$daysDifference.' day' ); 

        $interval = new DateInterval('P'.$daysDifference.'D');
        $daterange = new DatePeriod($begin, $interval ,$endModify);

        foreach($daterange as $date){
            $dates_in_range[$date->getTimestamp()] = $date->format("Y-m-d");
        }
        return $dates_in_range;
    }
1206179
public static boolean isPeriodActive(final Date startDate, final Date endDate) {
		if (startDate == null && endDate == null) {
			return true;
		}
		if (startDate == null) {
			throw new JKException("START_DATE_CAN_NOT_BE_NULL");
		}
		if (endDate == null) {
			throw new JKException("END_DATE_CAN_NOT_BE_NULL");
		}
		if (compareTwoDates(startDate, endDate).equals(CompareDates.DATE1_GREATER_THAN_DATE2)) {
			throw new JKException("START_DATE_MUST_BE_BEFORE_END_DATE");
		}
		final boolean startLessThanCurrent = compareTwoDates(startDate, getSystemDate()).equals(CompareDates.DATE1_LESS_THAN_DATE2);
		final boolean endGreaterThanCurrent = compareTwoDates(endDate, getSystemDate()).equals(CompareDates.DATE1_GREATER_THAN_DATE2);
		return startLessThanCurrent && endGreaterThanCurrent;
	}
102962
public Expression<java.util.Date> between(java.util.Date startValue, java.util.Date endValue) {
		SimpleDateFormat formatter = getDateTimeFormatter();
		String valueString = "'" + formatter.format(startValue).concat("Z") + "' AND '" + formatter.format(endValue) + "'";
		return new Expression<java.util.Date>(this, Operation.between, valueString);
	}
127446
public static Date beginOfDate(@NotNull final Date date) {
		return DateUtils.truncate(date, Calendar.DATE);
	}
549463
public Date getFinishTime(Date date)
   {
      Date result = null;

      if (date != null)
      {
         ProjectCalendarDateRanges ranges = getRanges(date, null, null);
         if (ranges == null)
         {
            result = getParentFile().getProjectProperties().getDefaultEndTime();
            result = DateHelper.getCanonicalTime(result);
         }
         else
         {
            Date rangeStart = result = ranges.getRange(0).getStart();
            Date rangeFinish = ranges.getRange(ranges.getRangeCount() - 1).getEnd();
            Date startDay = DateHelper.getDayStartDate(rangeStart);
            Date finishDay = DateHelper.getDayStartDate(rangeFinish);

            result = DateHelper.getCanonicalTime(rangeFinish);

            //
            // Handle the case where the end of the range is at midnight -
            // this will show up as the start and end days not matching
            //
            if (startDay != null && finishDay != null && startDay.getTime() != finishDay.getTime())
            {
               result = DateHelper.addDays(result, 1);
            }
         }
      }
      return result;
   }
1176675
public static Date beginOfMinute(@NotNull final Date date) {
		return DateUtils.truncate(date, Calendar.MINUTE);
	}
359875
public static Date getDayStartDate(Date date)
   {
      if (date != null)
      {
         Calendar cal = popCalendar(date);
         cal.set(Calendar.HOUR_OF_DAY, 0);
         cal.set(Calendar.MINUTE, 0);
         cal.set(Calendar.SECOND, 0);
         cal.set(Calendar.MILLISECOND, 0);
         date = cal.getTime();
         pushCalendar(cal);
      }
      return (date);
   }
1098988
public static int getMonthSpan(Date begin, Date end) {
        Calendar beginCal = new GregorianCalendar();
        beginCal.setTime(begin);
        Calendar endCal = new GregorianCalendar();
        endCal.setTime(end);
        int m = (endCal.get(Calendar.MONTH)) - (beginCal.get(Calendar.MONTH));
        int y = (endCal.get(Calendar.YEAR)) - (beginCal.get(Calendar.YEAR));
        return y * 12 + m;
    }
997822
public static double durationSeconds(LocalDateTime start, LocalDateTime end)
   {
	   return Duration.between(start, end).getSeconds();
   }
646088
public SearchParams between(final Date start, final Date end) {
        return this.creationGte(start).creationLte(end);
    }
618428
private int diff360EIsda(final LocalDate start, final LocalDate end) {
        if (start.equals(end)) {
            return 0;
        }
        int dayStart = start.getDayOfMonth();
        int dayEnd = end.getDayOfMonth();
        if (start.getMonth().length(start.isLeapYear()) == dayStart) {
            dayStart = CalculatorConstants.MONTH_30_DAYS;
        }
        if (end.getMonth() != Month.FEBRUARY && end.getMonth().length(end.isLeapYear()) == dayEnd) {
            dayEnd = CalculatorConstants.MONTH_30_DAYS;
        }
        return (end.getYear() - start.getYear()) * CalculatorConstants.YEAR_360 + (end.getMonthValue() - start.getMonthValue()) * CalculatorConstants.MONTH_30_DAYS + dayEnd - dayStart;
    }
33389
public static double durationMinutes(LocalDateTime start, LocalDateTime end)
   {
	   
      return Duration.between(start, end).toMinutes();
   }
1217990
public static function getMinutesCount($beginDate, $endDate)
    {
        // Get date diff
        $diff = $endDate->diff($beginDate);

        // Calculate all minutes
        $minutes = $diff->days * 24 * 60;
        $minutes += $diff->h * 60;
        $minutes += $diff->i;

        return $minutes;
    }
899368
public static long getMillisDifference(Date startDate, Date endDate) {
		long startTime = startDate.getTime();
		long endTime = endDate.getTime();
		long diffTime = endTime - startTime;
		return diffTime;
	}
1154942
private static int dayDiff(final Calendar start, final Calendar end) {
        final long diff = Math.abs(start.getTimeInMillis() - end.getTimeInMillis());
        final double dayDiff = (double) diff / MILLIS_IN_DAY;
        return (int) Math.round(dayDiff);
    }
462085
def get_time_diff_days(start, end):
    '''   '''

    if start is None or end is None:
        return None

    if type(start) is not datetime.datetime:
        start = parser.parse(start).replace(tzinfo=None)
    if type(end) is not datetime.datetime:
        end = parser.parse(end).replace(tzinfo=None)

    seconds_day = float(60 * 60 * 24)
    diff_days = (end - start).total_seconds() / seconds_day
    diff_days = float('%.2f' % diff_days)

    return diff_days