Skip to content

Commit

Permalink
Merge pull request #3 from stephenhky/develop
Browse files Browse the repository at this point in the history
default time length set to be 1 year
  • Loading branch information
stephenhky authored May 9, 2023
2 parents 59b9982 + 922a508 commit 32c9a05
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
Commands:

- /tips <subtotal> (<state (default: MD)>) (<split>): Calculating the tips.
- /stock <symbol> (<startdate> (default: 3 months ago)> (<enddate> (default: today)): Computing statistical information for the given symbol.
- /stockg <symbol> (<startdate> (default: 3 months ago)> (<enddate> (default: today)): Computing statistical information for the given symbol, and the chart plotting.
- /stock <symbol> (<startdate> (default: 1 year ago)> (<enddate> (default: today)): Computing statistical information for the given symbol.
- /stockg <symbol> (<startdate> (default: 1 year ago)> (<enddate> (default: today)): Computing statistical information for the given symbol, and the chart plotting.
- /stockcorr <symbol1> <symbol2>: correlation between two symbols
- /search <text>: find the symbol name from the given text
- /help: display help message.
Expand Down
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def handling_stockinfo_message(message):
]
if len(finddates_ls) == 0:
enddate = date.today().strftime('%Y-%m-%d')
startdate = (date.today() - relativedelta(months=3)).strftime('%Y-%m-%d')
startdate = (date.today() - relativedelta(years=1)).strftime('%Y-%m-%d')
elif len(finddates_ls) == 1:
enddate = date.today().strftime('%Y-%m-%d')
startdate = stringlists[finddates_ls[0]]
Expand Down Expand Up @@ -319,7 +319,7 @@ def handling_stockcorrelation_message(message):
]
if len(finddates_ls) == 0:
enddate = date.today().strftime('%Y-%m-%d')
startdate = (date.today() - relativedelta(months=3)).strftime('%Y-%m-%d')
startdate = (date.today() - relativedelta(years=1)).strftime('%Y-%m-%d')
elif len(finddates_ls) == 1:
enddate = date.today().strftime('%Y-%m-%d')
startdate = stringlists[finddates_ls[0]]
Expand Down

0 comments on commit 32c9a05

Please sign in to comment.