Java OffsetDateTime asDate(Calendar calendar)

Here you can find the source of asDate(Calendar calendar)

Description

as Date

License

Apache License

Declaration

public static Date asDate(Calendar calendar) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.time.OffsetDateTime;
import java.util.Calendar;
import java.util.Date;

public class Main {
    public static Date asDate(Calendar calendar) {
        return new Date(calendar.getTimeInMillis());
    }//  w  w w.  j a  v a2s .  c o  m

    public static Date asDate(OffsetDateTime offsetDateTime) {
        return new Date(offsetDateTime.toEpochSecond());
    }
}

Related

  1. cloneInternally(E source, Map visited)
  2. compareChrono(TemporalAccessor date1, TemporalAccessor date2)
  3. compareOffsetDateTimes(OffsetDateTime offsetDateTime1, OffsetDateTime offsetDateTime2)
  4. convertDateToOffsetDateTime(Date date)