Reads a date from a parcel from its current position.
Use this to retrieve dates stored with {@link #writeDate(Parcel, Date)}.
@return the stored date if any, or null otherwise
@see #writeDate(Parcel, Date)
507627
public static Date readDate (final Parcel parcel) {
        final byte isADateStored = parcel.readByte();
        return (isADateStored == MARKER_AN_ELEMENT_STORED) ? new Date(parcel.readLong()) : null;
    }
313948
public Date getTime(Integer type)
   {
      Date result = null;

      byte[] item = m_map.get(type);
      if (item != null)
      {
         result = MPPUtility.getTime(item, 0);
      }

      return (result);
   }
974241
public Date getDate( String key )
        throws MissingResourceException
    {
        ResourceBundle bundle = getBundle();
        String value = bundle.getString( key );
        try
        {
            DateFormat format =
                DateFormat.getDateInstance( DateFormat.DEFAULT, m_locale );
            return format.parse( value );
        }
        catch( ParseException pe )
        {
            throw new MissingResourceException( "Expecting a date value but got " + value,
                                                "java.lang.String",
                                                key
            );
        }
    }
1288542
public String getDate() {
        SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy");
        String date = formatter.format(calendar.getTime());

        return date;
    }
100393
@Override
    public/* final */Date fromBytes(Class targetClass, byte[] bytes)
    {
        try
        {
            if (bytes == null)
            {
                return null;
            }

            try
            {
                // In case date.getTime() is stored in DB.
                LongAccessor longAccessor = new LongAccessor();

                return new Date(longAccessor.fromBytes(targetClass, bytes));
            }
            catch (NumberFormatException nfex)
            {
                return getDateByPattern(new String(bytes, Constants.ENCODING));

            }
        }
        catch (Exception e)
        {
            log.error("Caused by {}.", e);
            throw new PropertyAccessException(e);
        }
    }
315774
private static Date getSentDate(MimeMessage msg, Date defaultVal) {
        if (msg == null) {
            return defaultVal;
        }
        try {
            Date sentDate = msg.getSentDate();
            if (sentDate == null) {
                return defaultVal;
            } else {
                return sentDate;
            }
        } catch (MessagingException me) {
            return new Date();
        }
    }
475140
public static final Date getDate(InputStream is) throws IOException
   {
      long timeInSeconds = getInt(is);
      if (timeInSeconds == 0x93406FFF)
      {
         return null;
      }
      timeInSeconds -= 3600;
      timeInSeconds *= 1000;
      return DateHelper.getDateFromLong(timeInSeconds);
   }
420366
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
    @JsonProperty("date")
    public Date getDate() {
        return date;
    }
690803
public com.google.api.ads.admanager.axis.v201805.Date getDate() {
        return date;
    }
157519
@Override
    public Instant getCreatedDate() {
        try {
            if (hasProperty(FEDORA_CREATED)) {
                return ofEpochMilli(getTimestamp(FEDORA_CREATED, NO_TIME));
            }
            if (hasProperty(JCR_CREATED)) {
                return ofEpochMilli(getTimestamp(JCR_CREATED, NO_TIME));
            }
        } catch (final PathNotFoundException e) {
            throw new PathNotFoundRuntimeException(e);
        } catch (final RepositoryException e) {
            throw new RepositoryRuntimeException(e);
        }
        LOGGER.debug("Node {} does not have a createdDate", node);
        return null;
    }
1195789
private static Date parseDate(@SuppressWarnings("SameParameterValue") String stringDate)
    {
        try {
            return formatter.parse(stringDate);
        } catch (ParseException e) {
            e.printStackTrace();
            return null;
        }
    }
1045689
public Date dateValue(String date) {
		Date value = null;
		if (date != null) {

			// Try each simple date formatter in order
			ParseException exception = null;
			for (SimpleDateFormat sdf : formatters) {
				try {
					synchronized (sdf) {
						value = sdf.parse(date);
					}
					break;
				} catch (ParseException e) {
					if (exception == null) {
						exception = e;
					}
				}
			}

			// If no value could be parsed throw the first expected parse
			// format exception
			if (value == null) {
				throw new GeoPackageException("Failed to parse date string: "
						+ date, exception);
			}

		}
		return value;
	}
498197
private SortedSet<Date> readDates(JSONValue json) {

        JSONArray array = null == json ? null : json.isArray();
        if (null != array) {
            SortedSet<Date> result = new TreeSet<>();
            for (int i = 0; i < array.size(); i++) {
                Date d = readOptionalDate(array.get(i));
                if (null != d) {
                    result.add(d);
                }
            }
            return result;
        }
        return new TreeSet<>();
    }
1304856
public Date getEndDate() {
        DateRange range = getSelectedRange();
        return range == null ? null : range.getEndDate();
    }
49640
public Date getDate() {
		try {
            date = dateFormatter.parse(getText());
		} catch (ParseException e) {
			date = null;
		}
		return date;
	}
941349
public Date getDate( int index ) throws OdaException
	{
		java.util.Date value = (java.util.Date) getFieldValue(index);
		return value==null?new Date(0):new Date(value.getTime());
	}
213690
public static Calendar getDate(ValueData valueData) throws RepositoryException
   {
      if (valueData instanceof TransientValueData)
      {
         return getDate(((TransientValueData)valueData).delegate);
      }

      return ((AbstractValueData)valueData).getDate();
   }