Package org.joda.time

Examples of org.joda.time.DateTime.toLocalTime()


            DateTime out = new LocaleBasedJodaTimeConverter(localization).convert(value, shortTime());
            if (out == null) {
                return null;
            }
           
            return out.toLocalTime();
        } catch (Exception e) {
      throw new ConversionError(MessageFormat.format(bundle.getString("is_not_a_valid_time"), value));
        }
  }
}
View Full Code Here


      DateTime out = new LocaleBasedJodaTimeConverter(localization).convert(value, shortTime());
      if (out == null) {
      return null;
      }
     
      return out.toLocalTime();
    } catch (Exception e) {
        throw new ConversionError(MessageFormat.format(bundle.getString("is_not_a_valid_time"), value));
    }
  }
}
View Full Code Here

               
                DateTime nextDateTime = start.minuteOfDay().roundFloorCopy();
                while (nextDateTime.isBefore(end)) {
                   
                    //get/create TimeDimension
                    final LocalTime localTime = nextDateTime.toLocalTime();
                    TimeDimension td = times.get(localTime);
                    if (td == null) {
                        td = timeDimensionDao.createTimeDimension(localTime);
                        times.put(localTime, td);
                    }
View Full Code Here

                start = interval.determineStart(instant);
                end = interval.determineEnd(start);
            }
        }
       
        final LocalTime startTime = start.toLocalTime();
        final TimeDimension startTimeDimension = this.timeDimensionDao.getTimeDimensionByTime(startTime);

        final DateMidnight startDateMidnight = start.toDateMidnight();
        final DateDimension startDateDimension = this.dateDimensionDao.getDateDimensionByDate(startDateMidnight);
       
View Full Code Here

        }
       
        try {     
          DateTimeFormatter formatter = DateTimeFormat.forPattern("HH:mm:ss");
          finalStartTime = formatter.parseDateTime(startTime);
          LocalTime localDateTime = finalStartTime.toLocalTime();
          finalStartTime = localDateTime.toDateTimeToday();
         
           PeriodFormatter pFormatter= new PeriodFormatterBuilder()
             .appendHours()
             .appendSeparator(":")
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.