public static void main(String[] args) { System.out.println("-----------------------------------------------"); System.out.println("-----------AbstractInstant---------------------"); Class cls = AbstractInstant.class; System.out.println("-----------ReadableDateTime--------------------"); cls = ReadableDateTime.class; System.out.println("-----------AbstractDateTime--------------------"); cls = AbstractDateTime.class; System.out.println("-----------DateTime----------------------------"); cls = DateTime.class; System.out.println("-----------DateTimeZone------------------------"); cls = DateTimeZone.class; System.out.println("-----------new DateTime()----------------------"); DateTime dt = new DateTime(); System.out.println("-----------new DateTime(ReadableInstant)-------"); dt = new DateTime(dt); System.out.println("-----------new DateTime(Long)------------------"); dt = new DateTime(new Long(0)); System.out.println("-----------------------------------------------"); }
public static long[] fromJodaDateTime(AbstractDateTime date) { return new long[] { date.getYear(), date.getMonthOfYear(), date.getDayOfMonth(), date.getHourOfDay(), date.getMinuteOfHour(), date.getSecondOfMinute() }; }
@Override public boolean canConvert(Class type) { return AbstractDateTime.class.isAssignableFrom(type); }