verify that parsing works for dates with slash
This commit is contained in:
parent
5d743383c7
commit
3ba4370477
|
@ -19,6 +19,8 @@
|
|||
|
||||
package org.elasticsearch.deps.joda;
|
||||
|
||||
import org.elasticsearch.util.joda.FormatDateTimeFormatter;
|
||||
import org.elasticsearch.util.joda.Joda;
|
||||
import org.joda.time.DateTimeZone;
|
||||
import org.joda.time.format.DateTimeFormatter;
|
||||
import org.joda.time.format.ISODateTimeFormat;
|
||||
|
@ -63,4 +65,9 @@ public class SimpleJodaTests {
|
|||
Date date = new Date();
|
||||
assertThat(formatter.parseMillis(dateTimeWriter.print(date.getTime())), equalTo(date.getTime()));
|
||||
}
|
||||
|
||||
@Test public void testSlashInFormat() {
|
||||
FormatDateTimeFormatter formatter = Joda.forPattern("MM/yyyy");
|
||||
formatter.parser().parseMillis("01/2001");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@ dependencies {
|
|||
compile("org.jclouds:jclouds-httpnio:$jcloudsVersion")
|
||||
compile("org.jclouds:jclouds-blobstore:$jcloudsVersion")
|
||||
compile("org.jclouds:jclouds-aws:$jcloudsVersion")
|
||||
|
||||
distLib("org.jclouds:jclouds-httpnio:$jcloudsVersion")
|
||||
distLib("org.jclouds:jclouds-blobstore:$jcloudsVersion")
|
||||
distLib("org.jclouds:jclouds-aws:$jcloudsVersion")
|
||||
|
|
Loading…
Reference in New Issue