Browse Source

删除测试代码

research/11.0
richie 6 years ago
parent
commit
078b2c32ec
  1. 30
      fine-joda/src/com/fr/demo/Test.java

30
fine-joda/src/com/fr/demo/Test.java

@ -1,30 +0,0 @@
package com.fr.demo;
import com.fr.third.joda.time.DateTime;
import com.fr.third.joda.time.LocalDate;
import com.fr.third.joda.time.format.DateTimeFormat;
import com.fr.third.joda.time.format.DateTimeFormatter;
/**
* @author richie
* @version 10.0
* Created by richie on 2019-02-12
*/
public class Test {
public static void main(String... args) {
LocalDate date = LocalDate.now();
System.out.println(date);
String dateTime = "11/15/2013 08:00:00";
// Format for input
DateTimeFormatter dtf = DateTimeFormat.forPattern("MM/dd/yyyy HH:mm:ss");
// Parsing the date
DateTime jodatime = dtf.parseDateTime(dateTime);
// Format for output
DateTimeFormatter dtfOut = DateTimeFormat.forPattern("MM/dd/yyyy");
// Printing the date
System.out.println(dtfOut.print(jodatime));
}
}
Loading…
Cancel
Save