If I have a number of tasks - say, from my Work Breakdown Structure that take a few hours, then Gantt Project will take the input fraction of a day (e.g. 0.5 day = 4 hours) as 1 day. this will throw off the schedule completely when I include other tasks also.
I understand it will take a lot of extra trouble to have a newly designed UI with hours as input fields, but can this be a solution?
* #### plusMinutes public [Duration](https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html) plusMinutes(long minutesToAdd) Returns a copy of this duration with the specified duration in minutes added. This instance is immutable and unaffected by this method call. Parameters: `minutesToAdd` - the minutes to add, positive or negative Returns: a `Duration` based on this duration with the specified minutes added, not null Throws: `ArithmeticException` - if numeric overflow occurs
The Instant class provides a variety of methods for manipulating an Instant. There are plus and minus methods for adding or subtracting time. The following code adds 1 hour to the current time:
Instant oneHourLater = Instant.now().plusHours(1);
There are methods for comparing instants, such as isAfter and isBefore. The until method returns how much time exists between two Instant objects. The following line of code reports how many seconds have occurred since the beginning of the Java epoch.
long secondsFromEpoch = Instant.ofEpochSecond(0L).until(Instant.now(), ChronoUnit.SECONDS);
The Instant class does not work with human units of time, such as years, months, or days. If you want to perform calculations in those units, you can convert an Instant to another class, such as LocalDateTime or ZonedDateTime, by binding the Instant with a time zone. You can then access the value in the desired units. The following code converts an Instant to a LocalDateTime object using the ofInstant method and the default time zone, and then prints out the date and time in a more readable form:
Instant timestamp; … LocalDateTime ldt = LocalDateTime.ofInstant(timestamp, ZoneId.systemDefault()); System.out.printf("%s %d %d at %d:%d%n", ldt.getMonth(), ldt.getDayOfMonth(), ldt.getYear(), ldt.getHour(), ldt.getMinute());