Examples of toDate()


Examples of org.apache.jackrabbit.oak.plugins.value.Conversions.Converter.toDate()

                    converter = Conversions.convert(converter.toLong());
                }
                if (type == Type.BOOLEAN) {
                    return (T) Boolean.valueOf(converter.toBoolean());
                } else if (type == Type.DATE) {
                    return (T) converter.toDate();
                } else if (type == Type.DECIMAL) {
                    return (T) converter.toDecimal();
                } else if (type == Type.DOUBLE) {
                    return (T) Double.valueOf(converter.toDouble());
                } else if (type == Type.LONG) {
View Full Code Here

Examples of org.apache.james.imap.api.message.request.DayMonthYear.toDate()

        case SearchKey.TYPE_ANSWERED:
            return SearchQuery.flagIsSet(Flag.ANSWERED);
        case SearchKey.TYPE_BCC:
            return SearchQuery.address(AddressType.Bcc, key.getValue());
        case SearchKey.TYPE_BEFORE:
            return SearchQuery.internalDateBefore(date.toDate(), DateResolution.Day);
        case SearchKey.TYPE_BODY:
            return SearchQuery.bodyContains(key.getValue());
        case SearchKey.TYPE_CC:
            return SearchQuery.address(AddressType.Cc, key.getValue());
        case SearchKey.TYPE_DELETED:
View Full Code Here

Examples of org.apache.wicket.util.time.Time.toDate()

      // add Last-Modified header (to support HEAD requests and If-Modified-Since)
      final Time lastModified = resourceStream.lastModifiedTime();

      if (lastModified != null)
        resourceResponse.setLastModified(lastModified.toDate());

      try
      {
        // read resource data
        final byte[] bytes;
View Full Code Here

Examples of org.dspace.content.DCDate.toDate()

            while (tri.hasNext())
            {
                TableRow row = tri.next();
                DCDate d = new DCDate(row.getStringColumn("withdrawal_date"));
                row.setColumn("last_modified", d.toDate());
                DatabaseManager.update(context, row);
            }
            tri.close();

            // Next, update those items with a date.available
View Full Code Here

Examples of org.exolab.castor.types.DateTime.toDate()

            org.exolab.castor.types.Date parsedDate = new org.exolab.castor.types.Date(trimmed);
            return parsedDate.toDate();
        }

        DateTime parsedDateTime = new DateTime(trimmed);
        return parsedDateTime.toDate();
    } // -- parse

    /**
     * Returns the given date in a String format, using the ISO8601 format as
     * specified in the W3C XML Schema 1.0 Recommendation (Part 2: Datatypes)
View Full Code Here

Examples of org.joda.time.DateMidnight.toDate()

  @Test
  public void canConvertDate_toGregorianCalendar() {
    LocalDate lt = new LocalDate(2000, 1, 2);
    DateMidnight dm = lt.toDateMidnight(DateTimeZone.UTC);
   
    XMLGregorianCalendar gc = XmlUtils.asXMLGregorianCalendar(dm.toDate());
    Assert.assertEquals("2000-01-02T00:00:00.000Z", gc.toXMLFormat());
  }
 
  @Test
  public void canConvert_GregorianCalendar_toDate() {
View Full Code Here

Examples of org.joda.time.DateTime.toDate()

                validTill = assertion.getSaml2().getConditions().getNotOnOrAfter();
            } else {
                validTill = assertion.getSaml1().getConditions().getNotOnOrAfter();
            }
           
            SecurityToken securityToken = new SecurityToken(assertion.getId(), null, validTill.toDate());
            securityToken.setToken(assertion.getElement());
            securityToken.setPrincipal(principal);
           
            if (tokenRealm != null) {
                Properties props = new Properties();
View Full Code Here

Examples of org.joda.time.DateTime.toDate()

            } else {
                validFrom = assertion.getSaml1().getConditions().getNotBefore();
                validTill = assertion.getSaml1().getConditions().getNotOnOrAfter();
            }
            response.setCreated(validFrom.toDate());
            response.setExpires(validTill.toDate());
           
            response.setEntropy(entropyBytes);
            if (keySize > 0) {
                response.setKeySize(keySize);
            }
View Full Code Here

Examples of org.joda.time.DateTime.toDate()

        final DateTime dt = new DateTime(2013,2,1,14,15,0, DateTimeZone.UTC);
        final String s = "New string";
       
        argRepr.mapPut("localDateProperty.value", "2013-05-01");
        argRepr.mapPut("localDateTimeProperty.value", "2013-02-01T14:15:00Z");
        argRepr.mapPut("dateTimeProperty.value", asIso(dt.toDate()));
        argRepr.mapPut("stringProperty.value", s);

        final RestfulResponse<JsonRepresentation> result = client.follow(updateLink, argRepr);
        assertThat(result.getStatus(), is(HttpStatusCode.OK));
       
View Full Code Here

Examples of org.joda.time.DateTime.toDate()

       
        final DomainObjectRepresentation afterResp = result.getEntity().as(DomainObjectRepresentation.class);
       
        assertThat(afterResp.getProperty("localDateProperty").getString("value"), is("2013-05-01")); // being a bit hacky here...
        assertThat(afterResp.getProperty("localDateTimeProperty").getDateTime("value"), is(ldt.toDate()));
        assertThat(afterResp.getProperty("dateTimeProperty").getDateTime("value"), is(dt.toDate()));
        assertThat(afterResp.getProperty("stringProperty").getString("value"), is(s));
    }
   
    private static String asIso(final java.util.Date d) {
        final org.joda.time.DateTime dt = new org.joda.time.DateTime(d.getTime());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.