Skip to content

Commit

Permalink
We don't need remove_ordinals after all
Browse files Browse the repository at this point in the history
  • Loading branch information
baldwint committed Mar 4, 2015
1 parent 4c11989 commit 0ccec4e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
5 changes: 0 additions & 5 deletions clans/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@ def default(self, obj):
return re.sub(r', \n', ',\n', string)


def remove_ordinals(string):
"""Remove Anglocentric ordinal suffixes from numbers"""
return re.sub(r'(\d+)(st|nd|rd|th)', r'\1', string)


def parse_plans_date(string, tz_name='US/Central'):
"""Convert date string to a python datetime.
Expand Down
9 changes: 0 additions & 9 deletions tests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,6 @@ def test_convert_endings(lf, cr, crlf):
assert crlf == util.convert_endings(crlf, 'CRLF')


@pytest.mark.parametrize('orig,cleaned', [
('4th', '4'),
('January 12th', 'January 12'),
('Nov 2nd 2014', 'Nov 2 2014'),
])
def test_remove_ordinals(orig, cleaned):
assert util.remove_ordinals(orig) == cleaned


@pytest.mark.parametrize('string,result', [
# Central time is -6 in the winter and -5 in the summer
('Wed January 28th 2015, 5:46 PM',
Expand Down

0 comments on commit 0ccec4e

Please sign in to comment.