Examples of toGregorianCalendar()


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

        System.out.println("Convert to Instant:   in.toInstant():           " + in.toInstant());
        System.out.println("Convert to DateTime:  in.toDateTime():          " + in.toDateTime());
        System.out.println("Convert to MutableDT: in.toMutableDateTime():   " + in.toMutableDateTime());
        System.out.println("Convert to Date:      in.toDate():              " + in.toDate());
        System.out.println("Convert to Calendar:  in.toCalendar(Locale.UK): " + in.toCalendar(Locale.UK).toString().substring(0, 46));
        System.out.println("Convert to GregCal:   in.toGregorianCalendar(): " + in.toGregorianCalendar().toString().substring(0, 46));
        System.out.println("");
        System.out.println("                      in2 = new DateTime(in.getMillis() + 10)");
        DateTime in2 = new DateTime(in.getMillis() + 10);
        System.out.println("Equals ms and chrono: in.equals(in2):           " + in.equals(in2));
        System.out.println("Compare millisecond:  in.compareTo(in2):        " + in.compareTo(in2));
View Full Code Here

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

            break;
        case TIME:
            DateTime dateTime = ((RubyTime) arg).getDateTime();
            Timestamp ts = new Timestamp(dateTime.getMillis());
            ts.setNanos(ts.getNanos() + (int)(((RubyTime)arg).getUSec()) * 1000);
            ps.setTimestamp(idx, ts, dateTime.toGregorianCalendar());
            break;
        case DATE_TIME:
            DateTime datetime = TIMESTAMP_FORMAT.parseDateTime(arg.toString().replace('T', ' '));
            ps.setTimestamp(idx, new Timestamp(datetime.getMillis()));
            break;
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.