Skip to content

Commit

Permalink
feat: python3 support (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
yasakawa authored and wenboyu2 committed Nov 27, 2018
1 parent 22b338e commit 1174854
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ date_from = datetime.datetime.strptime(
date_to = datetime.datetime.strptime(
'May 8 2017 1:00PM', '%b %d %Y %I:%M%p')
yec = YahooEarningsCalendar()
print yec.earnings_on(date_from)
print yec.earnings_between(date_from, date_to)
print(yec.earnings_on(date_from))
print(yec.earnings_between(date_from, date_to))
```

#### Data attributes
Expand All @@ -42,6 +42,6 @@ print yec.earnings_between(date_from, date_to)
import datetime
from yahoo_earnings_calendar import YahooEarningsCalendar
# Returns the next earnings date of BOX in Unix timestamp
print yec.get_next_earnings_date('box')
print(yec.get_next_earnings_date('box'))
# 1508716800
```
2 changes: 1 addition & 1 deletion yahoo_earnings_calendar/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from scraper import YahooEarningsCalendar
from .scraper import YahooEarningsCalendar
6 changes: 3 additions & 3 deletions yahoo_earnings_calendar/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def earnings_between(self, from_date, to_date):
date_to = datetime.datetime.strptime(
'May 8 2017 1:00PM', '%b %d %Y %I:%M%p')
yec = YahooEarningsCalendar()
print yec.earnings_on(date_from)
print yec.earnings_between(date_from, date_to)
print(yec.earnings_on(date_from))
print(yec.earnings_between(date_from, date_to))
# Returns the next earnings date of BOX in Unix timestamp
print yec.get_next_earnings_date('box')
print(yec.get_next_earnings_date('box'))

0 comments on commit 1174854

Please sign in to comment.