congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
CalendarDate.toDate
Code IndexAdd Tabnine to your IDE (free)

How to use
toDate
method
in
ucar.nc2.time.CalendarDate

Best Java code snippets using ucar.nc2.time.CalendarDate.toDate (Showing top 20 results out of 315)

origin: edu.ucar/netcdf

/**
 * Does not handle non-standard calendars
 * @deprecated
 */
public DateRange toDateRange() {
 return new DateRange(start.toDate(), end.toDate());
}
origin: edu.ucar/cdm

@Override
public Date getStartDate() {
 CalendarDate cdate = getCalendarDateStart();
 return (cdate == null) ? null : cdate.toDate();
}
origin: edu.ucar/cdm

/**
 * Does not handle non-standard Calendars
 * @deprecated use getCalendarDates() to correctly interpret calendars
 */
public java.util.Date[] getTimeDates() {
 List<CalendarDate> cdates = getCalendarDates();
 Date[] timeDates = new Date[cdates.size()];
 int index = 0;
 for (CalendarDate cd : cdates)
  timeDates[index++] = cd.toDate();
 return timeDates;
}
origin: edu.ucar/netcdf

/**
 * Does not handle non-standard Calendars
 * @param iso iso formatted string
 * @return Date
 * @throws IllegalArgumentException
 * @deprecated use isoStringToCalendarDate
 */
static public Date isoStringToDate(String iso) throws IllegalArgumentException {
 CalendarDate dt = isoStringToCalendarDate(null, iso);
  return dt.toDate();
}
origin: edu.ucar/cdm

/**
 * Does not handle non-standard Calendars
 * @param iso iso formatted string
 * @return Date
 * @throws IllegalArgumentException
 * @deprecated use isoStringToCalendarDate
 */
static public Date isoStringToDate(String iso) throws IllegalArgumentException {
 CalendarDate dt = isoStringToCalendarDate(null, iso);
  return dt.toDate();
}
origin: Unidata/thredds

/**
 * Does not handle non-standard Calendars
 * @deprecated use getCalendarDates() to correctly interpret calendars
 */
public java.util.Date[] getTimeDates() {
 List<CalendarDate> cdates = getCalendarDates();
 Date[] timeDates = new Date[cdates.size()];
 int index = 0;
 for (CalendarDate cd : cdates)
  timeDates[index++] = cd.toDate();
 return timeDates;
}
origin: edu.ucar/netcdf

/**
 * Does not handle non-standard Calendars
 * @deprecated use getCalendarDate()
 */
 public java.util.Date getTimeDate (int idx) {
  return getCalendarDate(idx).toDate();
 }
origin: edu.ucar/cdm

/**
 * Does not handle non-standard Calendars
 * @deprecated use getCalendarDate()
 */
 public java.util.Date getTimeDate (int idx) {
  return getCalendarDate(idx).toDate();
 }
origin: Unidata/thredds

/**
 * Does not handle non-standard Calendars
 * @deprecated use getCalendarDate()
 */
 public java.util.Date getTimeDate (int idx) {
  return getCalendarDate(idx).toDate();
 }
origin: edu.ucar/netcdf

/**
 * Get this as a Date.
 * Does not handle non-standard Calendars.
 * @deprecated use getCalendarDate()
 * @return Date
 */
public Date getDate() {
 return isPresent() ? new Date() : date.toDate();
}
origin: edu.ucar/netcdf

/**
 * Does not handle non-standard Calendars
 * @deprecated use getCalendarDates() to correctly interpret calendars
 */
public java.util.Date[] getTimeDates() {
 List<CalendarDate> cdates = getCalendarDates();
 Date[] timeDates = new Date[cdates.size()];
 int index = 0;
 for (CalendarDate cd : cdates)
  timeDates[index++] = cd.toDate();
 return timeDates;
}
origin: edu.ucar/cdm

/**
 * Get this as a Date.
 * Does not handle non-standard Calendars.
 * @deprecated use getCalendarDate()
 * @return Date
 */
public Date getDate() {
 return isPresent() ? new Date() : date.toDate();
}
origin: Unidata/thredds

/**
 * Does not handle non-standard Calendars
 * @param iso iso formatted string
 * @return Date
 * @throws IllegalArgumentException
 * @deprecated use isoStringToCalendarDate
 */
static public Date isoStringToDate(String iso) throws IllegalArgumentException {
 CalendarDate dt = isoStringToCalendarDate(null, iso);
  return dt.toDate();
}
origin: edu.ucar/cdm

protected void setStartDate() {
 String datetime = ds.findAttValueIgnoreCase(null, "time_coverage_start", null);
 if (datetime != null) {
  startDate = CalendarDate.parseISOformat(null, datetime).toDate();
 } else {
  startDate = calDateUnits.makeCalendarDate(time[0]).toDate();
 }
}
origin: Unidata/thredds

protected void setEndDate() {
 String datetime = ds.findAttValueIgnoreCase(null, "time_coverage_end", null);
 if (datetime != null) {
  endDate = CalendarDate.parseISOformat(null, datetime).toDate();
 } else {
  endDate = calDateUnits.makeCalendarDate(time[time.length - 1]).toDate();
 }
}
origin: Unidata/thredds

protected void setStartDate() {
 String datetime = ds.findAttValueIgnoreCase(null, "time_coverage_start", null);
 if (datetime != null) {
  startDate = CalendarDate.parseISOformat(null, datetime).toDate();
 } else {
  startDate = calDateUnits.makeCalendarDate(time[0]).toDate();
 }
}
origin: edu.ucar/cdm

protected void setEndDate() {
 String datetime = ds.findAttValueIgnoreCase(null, "time_coverage_end", null);
 if (datetime != null) {
  endDate = CalendarDate.parseISOformat(null, datetime).toDate();
 } else {
  endDate = calDateUnits.makeCalendarDate(time[time.length - 1]).toDate();
 }
}
origin: Unidata/thredds

private void testDate(String udunits) {
 Date uddate = DateUnit.getStandardDate(udunits);
 CalendarDate cd = CalendarDate.parseUdunits(null, udunits);
 if (!uddate.equals(cd.toDate())) {
  System.out.printf("  BAD %s == %s != %s (diff = %d)%n", udunits, df.toDateTimeString(uddate), cd, cd.toDate().getTime() - uddate.getTime());
 }
}
origin: Unidata/thredds

public void writeRecord(PointFeature pf, StructureData sdata) throws IOException {
 if (debug) System.out.println("PointFeature= " + pf);
 EarthLocation loc = pf.getLocation();
 int count = writeCoordinates(loc.getLatitude(), loc.getLongitude(), loc.getAltitude(), pf.getObservationTimeAsCalendarDate().toDate());
 for (int i = count; i < recordVars.size(); i++) {
  Variable v = recordVars.get(i);
  v.setCachedData(sdata.getArray(v.getShortName()), false);
 }
 ncfileOut.writeRecordData(recordVars);
}
origin: Unidata/thredds

@Test
public void testCalendarToDate() {
 CalendarDate cdate = CalendarDateFormatter.isoStringToCalendarDate(Calendar.uniform30day, "1968-01-30T15:00:00.000Z");
 System.out.printf("%s%n", cdate);
 System.out.printf("%s%n", cdate.getDateTime());
 System.out.printf("%s%n", cdate.toDate());
 System.out.printf("%s%n", CalendarDateFormatter.toDateTimeStringISO(cdate.toDate()));
 System.out.printf("%s%n", CalendarDateFormatter.toDateString(cdate));
 CalendarDateFormatter cdf = new CalendarDateFormatter("yyyyMMdd");
 System.out.printf("%s%n", cdf.toString(cdate));
}
ucar.nc2.timeCalendarDatetoDate

Javadoc

Get the equivilent java.util.Date

Popular methods of CalendarDate

  • getMillis
    Gets the milliseconds of the datetime instant from the Java epoch of 1970-01-01T00:00:00Z.
  • of
  • toString
    ISO formatted string
  • parseISOformat
    Get CalendarDate from ISO date string
  • add
  • equals
  • getDifferenceInMsecs
    Get difference between two calendar dates in millisecs
  • isAfter
  • getCalendar
  • isBefore
  • compareTo
  • getDateTime
  • compareTo,
  • getDateTime,
  • getHourOfDay,
  • parseUdunits,
  • present,
  • withDoy,
  • <init>,
  • getDifference,
  • getFieldValue

Popular in Java

  • Finding current android device location
  • addToBackStack (FragmentTransaction)
  • onRequestPermissionsResult (Fragment)
  • setContentView (Activity)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now