I want to filter sidebar content generated from
dynamic_sidebar() and only return the last 2 calendar years of archives (not last 24 months).
Is it possible to do this sort of filtering and how?
There is no clean way to filter whole sidebar and such, but then that's not what you really need.
The calendar widget (assuming you mean native one) uses
get_calendar() function, which passes result through
It would be preferable to filter its queries, but from quick look at the code they seem highly messy and not easy to override.