Examples of toDateMidnight()


Examples of org.joda.time.LocalDate.toDateMidnight()

  }
 
  @Test
  public void canConvert_GregorianCalendar_toDate() {
    LocalDate lt = new LocalDate(2000, 1, 2);
    DateMidnight dm = lt.toDateMidnight(DateTimeZone.UTC);
   
    Date d = dm.toDate();
   
    XMLGregorianCalendar gc = XmlUtils.asXMLGregorianCalendar(d);
    Date dConv = XmlUtils.asDate(gc);
View Full Code Here

Examples of org.joda.time.LocalDate.toDateMidnight()

    @ExcludeIn({CUBRID, DERBY, HSQLDB, SQLITE, TERADATA})
    public void Date_Diff2() {
        TestQuery query = query().from(employee).orderBy(employee.id.asc());

        LocalDate localDate = new LocalDate(1970, 1, 10);
        Date date = new Date(localDate.toDateMidnight().getMillis());

        int years = query.singleResult(SQLExpressions.datediff(DatePart.year, date, employee.datefield));
        int months = query.singleResult(SQLExpressions.datediff(DatePart.month, date, employee.datefield));
        // weeks
        int days = query.singleResult(SQLExpressions.datediff(DatePart.day, date, employee.datefield));
View Full Code Here

Examples of org.joda.time.LocalDate.toDateMidnight()

            }
            LocalDate local = parser.parseLocalDate(str);
            if (local == null) {
                return null;
            }
            return local.toDateMidnight();
        default:
        }
        throw ctxt.wrongTokenException(jp, JsonToken.START_ARRAY, "expected JSON Array, Number or String");
    }
}
View Full Code Here

Examples of org.joda.time.LocalDate.toDateMidnight()

            }
            LocalDate local = parser.parseLocalDate(str);
            if (local == null) {
                return null;
            }
            return local.toDateMidnight();
        }
        throw ctxt.wrongTokenException(jp, JsonToken.START_ARRAY, "expected JSON Array, Number or String");
    }
}
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.