Skip to content

Commit 042034c

Browse files
committed
Remove duplicate function
1 parent f54f757 commit 042034c

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

Lib/calendar.py

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -574,35 +574,6 @@ def formatyear(self, theyear, width=3):
574574
a('</table>')
575575
return ''.join(v)
576576

577-
def formatyearpage(self, theyear, width=3, css='calendar.css', encoding=None):
578-
"""
579-
Return a formatted year as a complete HTML page.
580-
"""
581-
if encoding is None:
582-
encoding = 'utf-8'
583-
v = []
584-
a = v.append
585-
a('<!DOCTYPE html>\n')
586-
a('<html lang="en">\n')
587-
a('<head>\n')
588-
a(f'<meta charset="{encoding}">\n')
589-
a('<meta name="viewport" content="width=device-width, initial-scale=1">\n')
590-
a(f'<title>Calendar for {theyear}</title>\n')
591-
a('<style>\n')
592-
a(':root { color-scheme: light dark; }\n')
593-
a('table.year { border: solid; }\n')
594-
a('table.year > tbody > tr > td { border: solid; vertical-align: top; }\n')
595-
a('</style>\n')
596-
if css is not None:
597-
a(f'<link rel="stylesheet" href="{css}">\n')
598-
a('</head>\n')
599-
a('<body>\n')
600-
a(self.formatyear(theyear, width))
601-
a('</body>\n')
602-
a('</html>\n')
603-
return ''.join(v).encode(encoding, "xmlcharrefreplace")
604-
605-
606577
def _format_html_page(self, theyear, content, css, encoding):
607578
"""
608579
Return a complete HTML page with the given content.

0 commit comments

Comments
 (0)