Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
141 commits
Select commit Hold shift + click to select a range
befe68f
When specifying a named time, set seconds to 00.
larrys Jan 4, 2011
200c3ee
donation badge
joestelmach Feb 3, 2011
8e4ec31
markdown
joestelmach Feb 3, 2011
dc83949
fixing badge
joestelmach Feb 3, 2011
ad73b39
updating link
joestelmach Feb 4, 2011
b93c72e
added morning and evening tokens and allowed them to be used as a tim…
joestelmach Feb 5, 2011
137d1b3
some renaming in preparation for relative times
joestelmach Feb 5, 2011
377abef
basic structure of relative time parsing
joestelmach Feb 5, 2011
b398c63
implemented relative times: '5 hrs from now', 'in 10 minutes', '2 hou…
joestelmach Feb 6, 2011
f28c810
initial range support as collection of dates
joestelmach Feb 7, 2011
12788f0
bumping up version to 0.3-SNAPSHOT
joestelmach Feb 7, 2011
e427aff
make that 0.3
joestelmach Feb 7, 2011
7049d99
swapping donation link
joestelmach Feb 8, 2011
8ec5555
swapping donation link
joestelmach Feb 8, 2011
daea9c2
swapping donation link
joestelmach Feb 8, 2011
38d0cc9
giving up on the donate button
joestelmach Feb 8, 2011
7445d7a
unit tests are now on par with the grammar tests
joestelmach Feb 9, 2011
75b9253
significant progress towards searching for dates within larger strings
joestelmach Feb 10, 2011
5619bd4
removed some parsing rules in favor of smarter capturing logic
joestelmach Feb 11, 2011
83f6d1e
successfully detecting multiple, non-contiguous groups of dates withi…
joestelmach Feb 11, 2011
a66516c
handling formats like 'tues this week'
joestelmach Feb 11, 2011
1febe37
persisting a given time across all dates in a group. for example: '3/…
joestelmach Feb 12, 2011
5b0e380
added 'and' and 'through' as conjunctions
joestelmach Feb 13, 2011
0707e31
implemented day of year and enhanced the day of month: 'first to last…
joestelmach Feb 13, 2011
221da10
new search functionality is operational
joestelmach Feb 16, 2011
3761e74
re-structuring antlr generation
joestelmach Feb 16, 2011
0761dcc
new approach to parsing within strings
joestelmach Feb 20, 2011
4349567
ignoring sub-token streams that yeild no syntax tree, more unit tests
joestelmach Feb 20, 2011
39ba341
adding some logging, fixing some lexer rules
joestelmach Feb 20, 2011
81384e1
added the ability to search for parse locations by rule name, allow c…
joestelmach Feb 21, 2011
9db3b86
split numeric rules out into a separate grammar, more tests
joestelmach Feb 22, 2011
2ea15a3
guard against antlr indexOutOfBoundsException while logging recogniti…
joestelmach Feb 24, 2011
a8f79c3
basic recurrence support
joestelmach Mar 4, 2011
c3c807a
basic recurrence support
joestelmach Mar 4, 2011
1c4c887
new formats: next day, last hour, next minute, for 5 seconds, for six…
joestelmach Mar 16, 2011
4cfa7a0
added cpan test
joestelmach Mar 16, 2011
6a62194
forcing unit tests to use eastern time zone
joestelmach Mar 30, 2011
f4de7db
[maven-release-plugin] prepare release natty-0.3
joestelmach Apr 4, 2011
04d06dd
[maven-release-plugin] prepare for next development iteration
joestelmach Apr 4, 2011
e1a6d6a
improved searching
joestelmach Jun 4, 2011
701e9dd
in 4 to 5 months, for 6 to 7 years
joestelmach Jun 10, 2011
40a0521
adding support for 'last 5 years', 'past two weeks', etc. Representi…
joestelmach Jun 12, 2011
300ff0e
clean up trailing white space in sub groups before parsing
joestelmach Sep 15, 2011
7f35b9e
[maven-release-plugin] prepare release natty-0.4
joestelmach Oct 19, 2011
e512397
[maven-release-plugin] prepare for next development iteration
joestelmach Oct 19, 2011
afe880d
initial holiday parsing
joestelmach Nov 5, 2011
4cb682f
working holiday implementation
joestelmach Nov 6, 2011
6ff9626
test was failing when invoked on dst switch date
joestelmach Nov 7, 2011
bf45382
allow dashes for conjunctions, allow missing dots in meridian indicators
joestelmach Nov 17, 2011
b46974f
september, in a january, in an october, in a week, etc.
joestelmach Nov 30, 2011
a808a52
search fixes
joestelmach Dec 1, 2011
804fa61
merging contiguous white space, adding explicit 'tonight' token
joestelmach Dec 5, 2011
ab1dc65
[maven-release-plugin] prepare release natty-0.5
joestelmach Jan 27, 2012
27b3c13
[maven-release-plugin] prepare for next development iteration
joestelmach Jan 27, 2012
b6bb464
reverting release
joestelmach Jan 27, 2012
391c341
[maven-release-plugin] prepare release natty-0.5
joestelmach Jan 27, 2012
cee5049
reverting release
joestelmach Jan 27, 2012
0495cb3
[maven-release-plugin] prepare release natty-0.5
joestelmach Jan 27, 2012
baa7969
[maven-release-plugin] prepare for next development iteration
joestelmach Jan 27, 2012
74e7f77
Make tests locale independe.t
nbeloglazov Mar 4, 2012
ffa6e2e
Merge pull request #28 from nbeloglazov/fix_test_locales
joestelmach Mar 7, 2012
7bfb22c
fixes #28
joestelmach Mar 7, 2012
ebe3fea
Make parser thread safe.
nbeloglazov Mar 14, 2012
047f16a
Merge pull request #29 from nbeloglazov/thread_safe
joestelmach Mar 15, 2012
7226841
Fix tests with uninitialised calendar and parser.
nbeloglazov Apr 2, 2012
5adc639
Merge pull request #33 from nbeloglazov/thread_safe
joestelmach Apr 5, 2012
65b79cd
[maven-release-plugin] prepare release natty-0.6
joestelmach May 9, 2012
c359b0d
[maven-release-plugin] prepare for next development iteration
joestelmach May 9, 2012
5920db8
Prefer 2 digit time instead of 2 digit year without prefix. fixes #35
joestelmach May 20, 2012
9e97edc
fixes #36
joestelmach May 20, 2012
dda2fbd
Always use timezone passed to parser in WalkerState. See https://gith…
nbeloglazov Jun 1, 2012
df83653
Fix misspelling and javadocs.
nbeloglazov Jun 1, 2012
e4b2fd6
Fix misspelling.
nbeloglazov Jun 1, 2012
f794d43
Merge pull request #39 from nbeloglazov/upstream-master
joestelmach Jun 2, 2012
f52c1a4
[maven-release-plugin] prepare release natty-0.7
joestelmach Oct 15, 2012
2165046
[maven-release-plugin] prepare for next development iteration
joestelmach Oct 15, 2012
ed132c6
Adding support for formal dates with no day of month 'oct 2006'. fix…
joestelmach Oct 20, 2012
57ec868
adding inferred time information to date groups. fixes #31
joestelmach Oct 20, 2012
76215d1
adding a new sub-parse strategy to resolve token streams that include…
joestelmach Oct 21, 2012
7073eac
adding basic season support. closes #22
joestelmach Oct 28, 2012
f8810dd
organizing imports
joestelmach Oct 9, 2013
45bef56
sub-token stream fence post error
joestelmach Oct 9, 2013
ad0875c
[maven-release-plugin] prepare release natty-0.8
joestelmach Oct 10, 2013
596b3d3
[maven-release-plugin] prepare for next development iteration
joestelmach Oct 10, 2013
6e2ad85
Fix for issue 46: Parsing error - Fri (.)*
katyaa Dec 5, 2013
7a710cc
intellij
joestelmach Dec 21, 2013
2dea23e
intellij settings
joestelmach Dec 21, 2013
1f24e96
fixes #59
joestelmach Dec 21, 2013
8363788
fixes #81
joestelmach Aug 3, 2014
6264112
closes #73
joestelmach Aug 4, 2014
5263d81
fixes #72
joestelmach Aug 4, 2014
5ab0f15
fixes #70
joestelmach Aug 4, 2014
6356150
fixes #67
joestelmach Aug 4, 2014
ca4fb3f
fixes #66, fixes #74
joestelmach Aug 4, 2014
9f7a823
fixes #62
joestelmach Aug 5, 2014
60b24d8
removing idea
joestelmach Aug 5, 2014
316cf87
Ensuring proper parsing when 'a' prefix is included.
joestelmach Sep 13, 2014
4bf75b8
gitignore updates
joestelmach Sep 13, 2014
d66e7e6
adding a tree rewrite rule to ensure year seek happens before day of …
joestelmach Sep 13, 2014
34bfa7f
ensuring day of week after X matches X after X logic
joestelmach Sep 13, 2014
2132c08
Time zone offsets
ztravis Oct 25, 2013
47d79ac
simplifying relaxed date rule
joestelmach Sep 18, 2014
b315ced
updating nexus urls
joestelmach Sep 28, 2014
d862ff5
[maven-release-plugin] prepare release natty-0.9
joestelmach Sep 28, 2014
169d41f
[maven-release-plugin] prepare for next development iteration
joestelmach Sep 28, 2014
9b9fc94
Adding friendly time zone support. fixes #97
joestelmach Jan 24, 2015
bcced76
fixes #91
joestelmach Jan 24, 2015
47a1932
Enable specific time to be used with 'tonight' or 'evening'. For exam…
joestelmach Jan 24, 2015
fc0ff4c
removing many ambiguous rules from grammar
joestelmach Jan 31, 2015
741ac15
small rule cleanup
joestelmach Feb 8, 2015
555a14a
adding 'current' as a prefix. Fixes #103
joestelmach Feb 8, 2015
5f9d799
antlr 3.3
joestelmach Feb 8, 2015
af230b9
Return EOF token when no more tokens available. Required for antlr 3…
Aug 7, 2014
47d328f
antlr 3.3 ParseListener api change
clementcm Feb 10, 2015
2964683
upgrading to antlr 3.5.2. fixes #60
joestelmach Feb 10, 2015
74b569a
[maven-release-plugin] prepare release natty-0.10
joestelmach Feb 10, 2015
416b53d
[maven-release-plugin] prepare for next development iteration
joestelmach Feb 10, 2015
31bd973
re-enable global date prefixes with no amount. fixes #108
joestelmach Feb 11, 2015
9a6e4c9
fixes #100
joestelmach Feb 11, 2015
66e32b7
If time information is found in a later date capture, ensure the info…
joestelmach Feb 12, 2015
b01cff3
fixing 'days ago' for numbers with one or two trailing zeroes
viktorasm Feb 12, 2015
f5814e8
additional tests for #99 fix
viktorasm Feb 12, 2015
8efbc33
future date tests for #99
joestelmach Feb 13, 2015
effdba5
Merge branch 'viktorasm-master'
joestelmach Feb 13, 2015
66d9449
dot version
joestelmach Feb 13, 2015
b6b6d44
[maven-release-plugin] prepare release natty-0.10.1
joestelmach Feb 13, 2015
e01e7b6
[maven-release-plugin] prepare for next development iteration
joestelmach Feb 13, 2015
bd7c3fb
adding 'tmr' as an alternative to 'tomorrow'. Fixes #94
joestelmach Feb 13, 2015
be835fe
test for alternative with 'ago' suffix. closes #65
joestelmach Feb 14, 2015
0911062
Ensure no dates found in strings like 'fried' or 'wedding'
joestelmach Mar 16, 2015
aa1426e
Ensure relative minutes can exceed 99. Closes #49
joestelmach Mar 17, 2015
0d168c6
Ignore known tokens directly following unknown tokens. Fixes #73
joestelmach Mar 17, 2015
2a55319
log token groups
joestelmach Mar 20, 2015
742d646
improve logging, move to slf4j + log4j
joestelmach Mar 20, 2015
ffc7926
Search improvements
joestelmach Mar 22, 2015
27841ad
Preserve dots in the middle of the token stream
joestelmach Mar 22, 2015
8be500a
closes #113
joestelmach Mar 23, 2015
6f47895
Make log4j test only dependency.
Apr 20, 2015
9d778fb
Merge pull request #125 from cylon/log4j-dependency-removal
joestelmach Apr 20, 2015
07c9b4a
[maven-release-plugin] prepare release natty-0.11
joestelmach May 12, 2015
d6aad83
Set log level to ERROR
oleg-smith Mar 10, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.classpath
.settings
.project
.idea
workspace.xml
bin
target
src/main/java/com/joestelmach/natty/generated/*
Expand Down
13 changes: 13 additions & 0 deletions .idea/libraries/Maven__antlr_antlr_2_7_7.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/libraries/Maven__commons_codec_commons_codec_1_5.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/libraries/Maven__commons_lang_commons_lang_2_6.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/libraries/Maven__commons_logging_commons_logging_1_1_1.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/libraries/Maven__junit_junit_4_1.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/libraries/Maven__org_antlr_antlr_3_2.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/libraries/Maven__org_antlr_antlr_runtime_3_2.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/libraries/Maven__org_antlr_gunit_3_2.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/libraries/Maven__org_antlr_stringtemplate_3_2.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/libraries/Maven__org_mnode_ical4j_ical4j_1_0_2.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/scopes/scope_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 5 additions & 33 deletions README
Original file line number Diff line number Diff line change
@@ -1,35 +1,7 @@
Natty is a natural language date parser written in Java. Given a date
expression, natty will apply standard language recognition and translation
Natty is a natural language date parser written in Java. Given a date
expression, natty will apply standard language recognition and translation
techniques to produce a list of corresponding dates with optional parse and
syntax information. Visit http://natty.joestelmach.com for complete documentation.
syntax information.

========== USAGE ==========

import com.joestelmach.natty.*;

Parser parser = new Parser();
ParseResult result = parser.parse("next monday");
List<Date> dates = result.getDates();

========== CHANGELOG ==========

* v.0.2.1

- implemented beginning/end syntax:
'beginning of next month'
'start of last week'
'last day of 3 octobers from now'

- implemented day of month:
'the thirtieth day of 3 aprils ago'

- bug fix: when seeking to a month whose maximum number of days is less than
the current day, the parser would roll into the next month.

* v.0.2.0

- implemented explicit relative dates like 'wed of next week'

* v.0.1.0

initial release
Complete documentation can be found here:
http://natty.joestelmach.com
41 changes: 41 additions & 0 deletions natty.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="EclipseModuleManager">
<conelement value="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER" />
<src_description expected_position="0">
<src_folder value="file://$MODULE_DIR$/src/main/java" expected_position="0" />
<src_folder value="file://$MODULE_DIR$/src/main/resources" expected_position="1" />
<src_folder value="file://$MODULE_DIR$/src/test/java" expected_position="2" />
<src_folder value="file://$MODULE_DIR$/src/test/resources" expected_position="3" />
</src_description>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="inheritedJdk" />
<orderEntry type="library" name="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER" level="application" />
<orderEntry type="library" name="Maven: org.antlr:antlr-runtime:3.5.2" level="project" />
<orderEntry type="library" name="Maven: org.mnode.ical4j:ical4j:1.0.2" level="project" />
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.5" level="project" />
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
<orderEntry type="library" name="Maven: backport-util-concurrent:backport-util-concurrent:3.1" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.10" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-log4j12:1.7.10" level="project" />
<orderEntry type="library" name="Maven: log4j:log4j:1.2.17" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.antlr:gunit:3.5.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.antlr:antlr:3.5.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.antlr:ST4:4.0.8" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.antlr:stringtemplate:3.2.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: antlr:antlr:2.7.7" level="project" />
</component>
</module>
Loading