PHP error with a shortcode: “no suitable wrapper” for file_get_contents

Use the HTTP API:

$http = wp_remote_get( 'https://en.wikipedia.org/w/api.php?action=query&titles=Test_article&prop=revisions&rvlimit=1&format=json' );

if ( ! $body = wp_remote_retrieve_body( $http ) )
    return;

if ( ! $data = json_decode( $body, true ) )
    return;

$date = new DateTime( $data['query']['pages']['746140638']['revisions'][0]['timestamp'] );

return $date->format( 'm-d-Y' );