1
|
/**
|
2
|
* Copyright (C) 2017 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
package eu.etaxonomy.cdm.test.function;
|
10
|
|
11
|
import java.time.Instant;
|
12
|
|
13
|
import org.joda.time.DateTime;
|
14
|
import org.joda.time.format.DateTimeFormat;
|
15
|
import org.joda.time.format.DateTimeFormatter;
|
16
|
|
17
|
/**
|
18
|
* @author a.mueller
|
19
|
\* @since 03.05.2017
|
20
|
*
|
21
|
*/
|
22
|
public class DateTimeFormatterTesting {
|
23
|
public static void main (String[] args){
|
24
|
DateTime dt = new DateTime();
|
25
|
DateTimeFormatter formatter = DateTimeFormat.forPattern("YYYY-MM-dd");
|
26
|
|
27
|
Instant.now();
|
28
|
|
29
|
System.out.println(formatter.print(dt));
|
30
|
|
31
|
}
|
32
|
}
|