Fix #63: The week_start is different from WakaTime
This commit is contained in:
parent
30896489cb
commit
4aeea1e94b
@ -153,7 +153,7 @@ Since this project is contained all within one file, 'main.py'. You can simply a
|
||||
`SHOW_TITLE` flag can be set to true if you want to display the week number and days in the readme, by default it will be false. Here is an example output with `SHOW_TITLE` set to true.
|
||||
|
||||
```text
|
||||
Week: 10 July, 2020 - 17 July, 2020
|
||||
Week: 11 July, 2020 - 17 July, 2020
|
||||
Python 8 hrs 52 mins ███████████████████░░░░░░ 75.87 %
|
||||
Go 1 hr 15 mins ██░░░░░░░░░░░░░░░░░░░░░░░ 10.79 %
|
||||
Markdown 52 mins █░░░░░░░░░░░░░░░░░░░░░░░░ 07.43 %
|
||||
|
2
main.py
2
main.py
@ -27,7 +27,7 @@ blocks = os.getenv("INPUT_BLOCKS")
|
||||
def this_week() -> str:
|
||||
'''Returns a week streak'''
|
||||
week_end = datetime.datetime.today() - datetime.timedelta(days=1)
|
||||
week_start = week_end - datetime.timedelta(days=7)
|
||||
week_start = week_end - datetime.timedelta(days=6)
|
||||
print("Week header created")
|
||||
return f"Week: {week_start.strftime('%d %B, %Y')} - {week_end.strftime('%d %B, %Y')}"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user