Skip to content

Commit d76e010

Browse files
committed
1 parent c534b5c commit d76e010

3 files changed

Lines changed: 15 additions & 9 deletions

File tree

‎nlp/pom.xml‎

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
23
<modelVersion>4.0.0</modelVersion>
34
<parent>
45
<artifactId>prettytime-parent</artifactId>
@@ -61,10 +62,15 @@
6162
</artifactSet>
6263
<relocations>
6364
<relocation>
64-
<excludes>
65-
<exclude>org.ocpsoft.**</exclude>
66-
</excludes>
67-
<shadedPattern>org.ocpsoft.prettytime.natty.</shadedPattern>
65+
<includes>
66+
<include>com.joestelmach.**</include>
67+
<include>edu.emory.**</include>
68+
<include>net.fortuna.**</include>
69+
<include>org.antlr.**</include>
70+
<include>org.apache.**</include>
71+
<include>zoneinfo.**</include>
72+
</includes>
73+
<shadedPattern>org.ocpsoft.prettytime.shade.</shadedPattern>
6874
</relocation>
6975
</relocations>
7076
</configuration>

‎nlp/src/main/java/org/ocpsoft/prettytime/nlp/PrettyTimeParser.java‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package org.ocpsoft.prettytime.nlp;
22

3-
import java.io.ObjectInputStream.GetField;
43
import java.util.ArrayList;
54
import java.util.Calendar;
65
import java.util.Date;

‎nlp/src/test/java/org/ocpsoft/prettytime/nlp/PrettyTimeParserTest.java‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import java.util.Calendar;
44
import java.util.Date;
55
import java.util.List;
6+
import java.util.Locale;
67

78
import junit.framework.Assert;
89

@@ -43,7 +44,7 @@ public void testParsePrettyTimeTime()
4344
{
4445
List<Date> parse = new PrettyTimeParser().parse("I did it three days ago");
4546
Assert.assertFalse(parse.isEmpty());
46-
String formatted = new PrettyTime().format(parse.get(0));
47+
String formatted = new PrettyTime(Locale.ENGLISH).format(parse.get(0));
4748
Assert.assertEquals("3 days ago", formatted);
4849
}
4950

@@ -52,7 +53,7 @@ public void testParseSyntax()
5253
{
5354
List<DateGroup> parse = new PrettyTimeParser().parseSyntax("I did it three days ago");
5455
Assert.assertFalse(parse.isEmpty());
55-
String formatted = new PrettyTime().format(parse.get(0).getDates().get(0));
56+
String formatted = new PrettyTime(Locale.ENGLISH).format(parse.get(0).getDates().get(0));
5657
Assert.assertEquals("3 days ago", formatted);
5758
Assert.assertEquals(1, parse.get(0).getLine());
5859
Assert.assertEquals(9, parse.get(0).getPosition());
@@ -67,7 +68,7 @@ public void testParseSyntaxRecurring()
6768
{
6869
List<DateGroup> parse = new PrettyTimeParser().parseSyntax("I do it every three days");
6970
Assert.assertFalse(parse.isEmpty());
70-
String formatted = new PrettyTime().format(parse.get(0).getDates().get(0));
71+
String formatted = new PrettyTime(Locale.ENGLISH).format(parse.get(0).getDates().get(0));
7172
Assert.assertEquals("3 days from now", formatted);
7273
Assert.assertEquals(1, parse.get(0).getLine());
7374
Assert.assertEquals(14, parse.get(0).getPosition());

0 commit comments

Comments
 (0)