Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Kirill Smelkov
topydo
Commits
33794435
Commit
33794435
authored
9 years ago
by
Bram Schoenmakers
Browse files
Options
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
)
...
...
This diff is collapsed.
Click to expand it.
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