code: public static DateValue getInstance(Date date) {
          DateValue result;
          if (date != null) {
              synchronized (cache) {
                  result = cache.get(date);
                  if (result == null) {
                      result = new DateValue(date);
                      cache.put(date, result);
                  }
              }
          } else {
              result = getInstance(new Date());
          }
          return result;
      }
docs: Constructs a new date value from a Java date object. Uses a cache to
  reuse date value objects.
  
  @param date a {@link Date}. If <code>null</code> a new date value is
  created using the current time.
  
  @return a {@link DateValue}.