Examples of Date


Examples of nl.siegmann.epublib.domain.Date

  private static List<Date> readDates(Element metadataElement) {
    NodeList elements = metadataElement.getElementsByTagNameNS(NAMESPACE_DUBLIN_CORE, DCTags.date);
    List<Date> result = new ArrayList<Date>(elements.getLength());
    for(int i = 0; i < elements.getLength(); i++) {
      Element dateElement = (Element) elements.item(i);
      Date date;
      try {
        date = new Date(DOMUtil.getTextChildrenContent(dateElement), dateElement.getAttributeNS(NAMESPACE_OPF, OPFAttributes.event));
        result.add(date);
      } catch(IllegalArgumentException e) {
        log.error(e.getMessage());
      }
    }
View Full Code Here

Examples of oracle.sql.DATE

        new OracleDateNormaliser().normalise("Any Old Object");
    }

    @Test
    public void shouldReturnContentsOfDateIfAllOkay() throws SQLException {
        DATE dt = mock(DATE.class);
        when(dt.timestampValue()).thenReturn(new Timestamp(0l));
        assertEquals(new Timestamp(0l), new OracleDateNormaliser().normalise(dt));
    }
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.refsem.Date

      //strength.addToIndexes(); // don't need to be able to get these directly from the AnnotationIndex
      medicationMention.setMedicationStrength(modifier);
    }

    if (fromAnnotation.getStartDate()!=null) {
      Date d = DateParser.parse(jcas, fromAnnotation.getStartDate());
      TimeMention timeMention = new TimeMention(jcas);
      timeMention.setDate(d);
      timeMention.setTimeClass(CONST.TIME_CLASS_DATE);
      // if (d!=null) d.addToIndexes(); // don't need to be able to get these directly from the AnnotationIndex
      if (d!=null) medicationMention.setStartDate(timeMention);
View Full Code Here

Examples of org.apache.ctakes.ytex.uima.types.Date

      while (iter.hasNext()) {
        Annotation anno = iter.next();
        try {
          Span span = Chronic.parse(anno.getCoveredText());
          if (span != null && span.getBeginCalendar() != null) {
            Date date = new Date(jCas);
            date.setBegin(anno.getBegin());
            date.setEnd(anno.getEnd());
            date.setDate(tlDateFormat.get().format(
                span.getBeginCalendar().getTime()));
            date.addToIndexes();
          }
        } catch (Exception e) {
          if (log.isDebugEnabled())
            log.debug(
                "chronic failed on: " + anno.getCoveredText(),
View Full Code Here

Examples of org.apache.isis.applib.value.Date

    // }}

    // {{ Lifecycle
    public void created() {
        status = "New";
        date = new Date();
    }
View Full Code Here

Examples of org.apache.sqoop.schema.type.Date

        break;
      case BIT:
        output = new Bit();
        break;
      case DATE:
        output = new Date();
        break;
      case DATE_TIME:
        output = new DateTime().setFraction(fraction).setTimezone(timezone);
        break;
      case DECIMAL:
View Full Code Here

Examples of org.apache.struts2.components.Date

    public String getBeanName() {
        return "date";
    }

    protected Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
        return new Date(stack);
    }
View Full Code Here

Examples of org.apache.tajo.engine.function.builtin.Date

public class TestGeneralFunction {

  @Test
  public void testDate() {
    Date date = new Date();
    Tuple tuple = new VTuple(new Datum[] {new TextDatum("25/12/2012 00:00:00")});
    Int8Datum unixtime = (Int8Datum) date.eval(tuple);
    Calendar c = Calendar.getInstance();
    c.setTimeInMillis(unixtime.asInt8());
    assertEquals(2012, c.get(Calendar.YEAR));
    assertEquals(11, c.get(Calendar.MONTH));
    assertEquals(25, c.get(Calendar.DAY_OF_MONTH));
View Full Code Here

Examples of org.apache.tools.ant.types.resources.selectors.Date

     * @since Ant 1.7
     */
    private static void logFuture(ProjectComponent logTo,
                                  ResourceCollection rc, long granularity) {
        long now = System.currentTimeMillis() + granularity;
        Date sel = new Date();
        sel.setMillis(now);
        sel.setWhen(TimeComparison.AFTER);
        Restrict future = new Restrict();
        future.add(sel);
        future.add(rc);
        for (Iterator iter = future.iterator(); iter.hasNext();) {
            logTo.log("Warning: " + ((Resource) iter.next()).getName()
View Full Code Here

Examples of org.boris.expr.function.excel.DATE

public class ExcelDateAndTimeFunctionsTest extends TH
{

    public void testDATE() throws Exception {
        DATE d = new DATE();
        assertEquals(eval(d, 3, 5, 6), 1222.);
        assertEquals(eval(d, 3444, 65, 78), 565960.);
        assertEquals(eval(d, -12, -12, -12), ExprError.NUM);
        assertEquals(eval(d, 10000, 1, 1), ExprError.NUM);
    }
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.