Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

...
  • 2 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
4 lib/akamod/enrich-date.py
View
@@ -29,8 +29,8 @@
DEFAULT_DATETIME_SECS = 32503680000.0 # UTC seconds for "3000-01-01"
-DATE_RANGE_RE = r'(\S+)\s*-\s*(\S+)'
-DATE_RANGE_EXT_RE = r'(\S+)\s*[-/]\s*(\S+)'
+DATE_RANGE_RE = r'([0-9-]+)\s*-\s*([0-9-]+)'
+DATE_RANGE_EXT_RE = r'([0-9-]+)\s*[-/]\s*([0-9-]+)'
def split_date(d):
reg = DATE_RANGE_EXT_RE
if len(d.split("/")) == 3: #so th date is like "2001 / 01 / 01"
2  setup.py
View
@@ -10,5 +10,5 @@
url='http://dp.la',
package_dir={'dplaingestion':'lib'},
packages=['dplaingestion','dplaingestion.akamod'],
- scripts=['scripts/poll_profiles','scripts/build_profile'],
+ scripts=['scripts/poll_profiles'],
)
1  test/test_enrich_date.py
View
@@ -263,6 +263,7 @@ def test_range_with_brackets():
("[ 1960-05-01 - 1960-05-15 ]", "1960-05-01 - 1960-05-15"),
("[1960-05-01 - 1960-05-15]", "1960-05-01 - 1960-05-15"),
("[1960-05-01 / 1960-05-15]", "1960-05-01 / 1960-05-15"),
+ ("[1960-05-01/1960-05-15]", "1960-05-01/1960-05-15"),
]
for r in ranges:

No commit comments for this range

Something went wrong with that request. Please try again.