Put your html in a single string. This way you know if you match things you should not match, like so:
#!/usr/bin/perl
use Mojo::DOM;
my $dom = Mojo::DOM->new();
$|=1;
$text='
<a class="ab">2016-05-18</a>
<a class="a b">2016-05-19</a>
<a class="b">2016-05-20</a>
<a class="a">2016-05-21</a>
';
my $test1=$dom->parse($text)->at('a.ab')->text;
print "18: $test1\n";
my @test2=$dom->parse($text)->find('a.a b')->map('text')->each;
print "19: @test2 (bad)\n";
my $test3=$dom->parse($text)->at('a.a.b')->text;
print "19: $test3\n";
18: 2016-05-18
19: 2016-05-18 2016-05-19 2016-05-20 2016-05-21 (bad)
19: 2016-05-19
Note, the find('a.a b') does not match anything, so to make it more interesting, I did a find('a. a b') |