In the registry, some `published` items might be actual Date objects (if they were created in this session), whereas others might be strings (if they were deserialized from JSON, since `JSON.parse()` doesn't deserialize date strings automatically). It would probably be good to make these consistent (perhaps by always stringifying the date immediately?), but I just made this function handle both cases.