I have seen lots of answers for getting when a node was last edited, but I can't seem to apply any of these methods to blocks. Basically, I have a block that I only want to display if it has been updated in the last week. When I view blocks in the admin, I see that the admin view shows you when a block was last edited.
I can get my block in hook_preprocess_block, and get things like $block->label(), but any variation of
$block->changed; fails for me.
And really, I need this value in my html template, not the block. So I need to get the specific block by ID, in hook_preprocess_html, get the time it was last updated as a unix timestamp, and this would give me the value I need for my twig template.