def calendar(self, title="<STR_LIT>", format_str="<STR_LIT>", date="<STR_LIT>", **kwargs):
if re.match(r"<STR_LIT>", date):<EOL><INDENT>year = date[<NUM_LIT:0>:<NUM_LIT:4>]<EOL>month = date[<NUM_LIT:5>:<NUM_LIT:7>]<EOL>day = date[<NUM_LIT:8>:<NUM_LIT:10>]<EOL>date_args = ["<STR_LIT>" + year, "<STR_LIT>" + month, "<STR_LIT>" + day]<EOL><DEDENT>else:<EOL><INDENT>date_args = []<EOL><DEDENT>return self._run_zenity(title, ["<STR_LIT>", "<STR_LIT>" + format_str] + date_args, kwargs)<EOL>
Show a calendar dialog

Usage: C{dialog.calendar_dialog(title="Choose a date", format="%Y-%m-%d", date="YYYY-MM-DD", **kwargs)}

@param title: window title for the dialog
@param format_str: format of date to be returned
@param date: initial date as YYYY-MM-DD, otherwise today
@return: a tuple containing the exit code and date
@rtype: C{DialogData(int, str)}