Example usage for org.joda.time DateTime getSecondOfDay

List of usage examples for org.joda.time DateTime getSecondOfDay

Introduction

In this page you can find the example usage for org.joda.time DateTime getSecondOfDay.

Prototype

public int getSecondOfDay() 

Source Link

Document

Get the second of day field value.

Usage

From source file:org.n52.shetland.util.DateTimeHelper.java

License:Apache License

/**
 * Get days between the given {@link DateTime}s with precision
 *
 * @param start//from  w  ww  .j  a  v  a 2  s .c  o m
 *            Start {@link DateTime}
 * @param end
 *            End {@link DateTime}
 * @return Days with precisions between the two {@link DateTime}s
 */
public static double getDaysSinceWithPrecision(DateTime start, DateTime end) {
    return Days.daysBetween(start, end).getDays() + end.getSecondOfDay() / SECONDS_OF_DAY;
}