Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
topydo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
topydo
Commits
33794435
Commit
33794435
authored
Nov 03, 2015
by
Bram Schoenmakers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return next week's date when today's weekday is entered as relative date.
parent
bd24c1df
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
topydo/lib/RelativeDate.py
topydo/lib/RelativeDate.py
+2
-3
No files found.
topydo/lib/RelativeDate.py
View file @
33794435
...
...
@@ -63,8 +63,7 @@ def _convert_weekday_pattern(p_weekday):
"""
Converts a weekday name to an absolute date.
When today's day of the week is entered, it will return today and not next
week's.
When today's day of the week is entered, it will return next week's date.
"""
day_value
=
{
'mo'
:
0
,
...
...
@@ -81,7 +80,7 @@ def _convert_weekday_pattern(p_weekday):
day
=
date
.
today
().
weekday
()
shift
=
(
target_day
-
day
)
%
7
shift
=
7
-
(
day
-
target_
day
)
%
7
return
date
.
today
()
+
timedelta
(
shift
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment