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
9829b995
Commit
9829b995
authored
Jun 14, 2014
by
Bram Schoenmakers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add accessors for creation date and completion date.
parent
c8ddc54d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
TodoBase.py
TodoBase.py
+11
-0
No files found.
TodoBase.py
View file @
9829b995
...
...
@@ -149,6 +149,13 @@ class TodoBase(object):
""" Returns True iff this todo has been completed. """
return self.fields['
completed
']
def completion_date(self):
"""
Returns the completion date when the todo has been completed, or None
otherwise.
"""
return self.fields['
completionDate
']
def set_completed(self):
"""
Marks the todo as complete.
...
...
@@ -164,6 +171,10 @@ class TodoBase(object):
self.src = re.sub(r'
^
(
\
([
A
-
Z
]
\
)
)
?
',
\
'
x
' + today.isoformat() + '
', self.src)
def creation_date(self):
""" Returns the creation date of a todo. """
return self.fields['
creationDate
']
def __str__(self):
""" A printer for the todo item. """
return self.source()
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