Package org.joda.time

Examples of org.joda.time.LocalTime


  private static final DateTimeFormatter DEFAULT_FORMATTER = DateTimeFormat.forPattern(DEFAULT_FORMAT_STRING);
  private final LocalTime time;

  public TimeDatum(long value) {
    super(TajoDataTypes.Type.TIME);
    time = new LocalTime(value);
  }
View Full Code Here


    time = new LocalTime(value);
  }

  public TimeDatum(int hour, int minute, int second) {
    super(TajoDataTypes.Type.TIME);
    time = new LocalTime(hour, minute, second);
  }
View Full Code Here

    time = new LocalTime(hour, minute, second);
  }

  public TimeDatum(int hour, int minute, int second, int millis) {
    super(TajoDataTypes.Type.TIME);
    time = new LocalTime(hour, minute, second, millis);
  }
View Full Code Here

            if (intradayDataJson.has(DATASET_KEY)) {
                JSONArray intradayDataArray = intradayDataJson.getJSONArray(DATASET_KEY);
                for (int i=0; i<intradayDataArray.size(); i++) {
                    JSONObject intradayDataRecord = intradayDataArray.getJSONObject(i);
                    String time = intradayDataRecord.getString("time") + "Z";
                    final LocalTime localTime = ISODateTimeFormat.timeNoMillis().parseLocalTime(time);
                    final long timeGmt = (midnight + localTime.getMillisOfDay())/1000;
                    int value = intradayDataRecord.getInt("value");
                    List<Object> record = new ArrayList<Object>();
                    record.add(timeGmt);
                    record.add(value);
                    if (metric.equals("calories")) {
View Full Code Here

    }

    @JsonIgnore
    public static Duration getDifference(LocalTime departure, LocalTime arrival) {
        if ( departure.isAfter(arrival) ) {
            return Minutes.minutesBetween(departure, new LocalTime(23, 59)).plus(1).plus(Minutes.minutesBetween(LocalTime.MIDNIGHT, arrival)).toStandardDuration();
        } else {
            return Minutes.minutesBetween(departure, arrival).toStandardDuration();
        }
    }
View Full Code Here

        this.departureMinute = time.getMinuteOfHour();
    }

    @JsonIgnore
    public LocalTime getDepartureTime() {
        return new LocalTime(departureHour, departureMinute);
    }
View Full Code Here

        this.arrivalMinute = time.getMinuteOfHour();
    }

    @JsonIgnore
    public LocalTime getArrivalTime() {
        return new LocalTime(arrivalHour, arrivalMinute);
    }
View Full Code Here

        return localTime.toString();
    }

    @Override
    public LocalTime unmarshal(String localTimeStr) throws Exception {
        return new LocalTime(localTimeStr);
    }
View Full Code Here

        WorkReportDTO workReportDTO = createWorkReportDTO(workReportTypeCode3);
        WorkReportLineDTO workReportLineDTO = workReportDTO.workReportLines
                .iterator().next();

        int hours = 12;
        LocalTime start = new LocalTime(8, 0);
        LocalTime end = start.plusHours(hours);
        workReportLineDTO.clockStart = DateConverter
                .toXMLGregorianCalendar(start);
        workReportLineDTO.clockFinish = DateConverter
                .toXMLGregorianCalendar(end);
View Full Code Here

        if (date == null) {
            return null;
        } else {
            if (isDefined(date.getHour()) && isDefined(date.getMinute())
                    && isDefined(date.getSecond())){
                return new LocalTime(date.getHour(), date.getMinute(), date
                    .getSecond());
            }
            return null;
        }
View Full Code Here

TOP

Related Classes of org.joda.time.LocalTime

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.