BAEL3236 Fixing test cases and updating the missed version in pom.xml

This commit is contained in:
Chirag Dewan
2019-10-26 18:46:18 +05:30
parent db85c8f275
commit f52e3c9e60
20349 changed files with 1637694 additions and 0 deletions
@@ -0,0 +1,31 @@
package com.baeldung.datetime;
import java.time.LocalTime;
import java.time.temporal.ChronoUnit;
public class UseLocalTime {
LocalTime getLocalTimeUsingFactoryOfMethod(int hour, int min, int seconds) {
return LocalTime.of(hour, min, seconds);
}
LocalTime getLocalTimeUsingParseMethod(String timeRepresentation) {
return LocalTime.parse(timeRepresentation);
}
private LocalTime getLocalTimeFromClock() {
return LocalTime.now();
}
LocalTime addAnHour(LocalTime localTime) {
return localTime.plus(1, ChronoUnit.HOURS);
}
int getHourFromLocalTime(LocalTime localTime) {
return localTime.getHour();
}
LocalTime getLocalTimeWithMinuteSetToValue(LocalTime localTime, int minute) {
return localTime.withMinute(minute);
}
}