def done(<EOL>self,<EOL>depth="<STR_LIT:root>"):
self.refresh<EOL>oldContent = self.to_string(indentLevel=<NUM_LIT:1>)<EOL>now = datetime.now()<EOL>now = now.strftime("<STR_LIT>")<EOL>newContent = self.to_string(<EOL>indentLevel=<NUM_LIT:1>, tags=["<STR_LIT>" % locals()])<EOL>self.parent._update_document_tree(<EOL>oldContent=oldContent,<EOL>newContent=newContent<EOL>)<EOL>if depth == "<STR_LIT:all>":<EOL><INDENT>try:<EOL><INDENT>for t in self.tasks:<EOL><INDENT>t.done("<STR_LIT:all>")<EOL><DEDENT><DEDENT>except:<EOL><INDENT>pass<EOL><DEDENT>try:<EOL><INDENT>for p in self.projects:<EOL><INDENT>t.done("<STR_LIT:all>")<EOL><DEDENT><DEDENT>except:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>self.content = self.to_string(indentLevel=<NUM_LIT:0>, title=False)<EOL>self.refresh<EOL>return self<EOL>
*mark this object as done*

        **Key Arguments:**
            - ``depth`` -- either mark root item as done or all recursive items. Default *"root"*. ["root"|"all"]

        **Usage:**

            To mark a task or project as done"

            .. code-block:: python

                aTask.done()

            Or or mark the object as done as well all descendant tasks and projects:

            .. code-block:: python

                aTask.done("all")