This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# intended for use in a Jupyter Notebook or similar. | |
import calendar | |
from calendar import HTMLCalendar | |
from IPython.display import HTML | |
class HighlightedCalendar(HTMLCalendar): | |
def __init__(self, highlight_dates={}, *args, **kwargs): | |
super().__init__(*args, **kwargs) | |
self._highlight_dates = {} | |
for color,dates in highlight_dates.items(): |