Java ZonedDateTime Calculate roundUp(ZonedDateTime date)

Here you can find the source of roundUp(ZonedDateTime date)

Description

round Up

License

Open Source License

Declaration

public static ZonedDateTime roundUp(ZonedDateTime date) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.time.ZonedDateTime;

import java.time.temporal.ChronoField;

public class Main {
    public static ZonedDateTime roundUp(ZonedDateTime date) {
        ChronoField field = ChronoField.NANO_OF_DAY;
        return date.with(field, field.range().getMaximum());
    }//from   www  . ja va 2s  .com
}

Related

  1. parseZonedDateTime(String zonedDateTimeString, String variableName)
  2. preProcess(String Val, ZonedDateTime BaseTimeMarker)
  3. printDateTimeCompact(ZonedDateTime ZDT, boolean PrintTime, boolean PrintSeconds)
  4. printDateTimeSuperCompact(ZonedDateTime ZDT)
  5. roundTimeMinQuarter(ZonedDateTime dateTime)
  6. secondsSinceMidnight(ZonedDateTime ZDT)
  7. simplifyZonedDateTime(ZonedDateTime now, long timeToWait)
  8. stringToZonedDateTimeUTC(String dateAsString)
  9. timestampToZonedDateTime(Long timestamp)