SunInfo: use less precise, but friendlier time.
parent
f039a07278
commit
0561d8ffec
|
@ -20,7 +20,7 @@ category 'calculations';
|
|||
topics 'everyday';
|
||||
attribution github => ['https://github.com/duckduckgo', 'duckduckgo'];
|
||||
|
||||
my $time_format = '%T %Z';
|
||||
my $time_format = '%l:%M%P';
|
||||
my $datestring_regex = datestring_regex();
|
||||
|
||||
handle remainder => sub {
|
||||
|
|
|
@ -8,12 +8,12 @@ use DDG::Test::Goodie;
|
|||
zci answer_type => 'sun_info';
|
||||
zci is_cached => 0;
|
||||
|
||||
my @now = (qr/^Location => Phoenixville, PA.*(EDT|EST)$/, html => qr/Location:.*(EDT|EST)/);
|
||||
my @aug = (qr/^Location => Phoenixville, PA | Date => 30 Aug.*(EDT|EST)$/, html => qr/Location:.*(EDT|EST)/);
|
||||
my @now = (qr/^Location => Phoenixville, PA.*pm$/, html => qr/Location:.*pm/);
|
||||
my @aug = (qr/^Location => Phoenixville, PA | Date => 30 Aug.*pm$/, html => qr/Location:.*pm/);
|
||||
my @exact = (
|
||||
'Location => Phoenixville, PA | Date => 01 Jan 2015 | Sunrise => 07:23:39 EST | Sunset => 16:46:52 EST',
|
||||
'Location => Phoenixville, PA | Date => 01 Jan 2015 | Sunrise => 7:23am | Sunset => 4:46pm',
|
||||
html =>
|
||||
'<div><span class="suninfo__label text--secondary">Location: </span><span class="text--primary">Phoenixville, PA</span></div><div><span class="suninfo__label text--secondary">Date: </span><span class="text--primary">01 Jan 2015</span></div><div><span class="suninfo__label text--secondary">Sunrise: </span><span class="text--primary">07:23:39 EST</span></div><div><span class="suninfo__label text--secondary">Sunset: </span><span class="text--primary">16:46:52 EST</span></div><style> .zci--answer .suninfo__label {display: inline-block; min-width: 90px}</style>'
|
||||
'<div><span class="suninfo__label text--secondary">Location: </span><span class="text--primary">Phoenixville, PA</span></div><div><span class="suninfo__label text--secondary">Date: </span><span class="text--primary">01 Jan 2015</span></div><div><span class="suninfo__label text--secondary">Sunrise: </span><span class="text--primary"> 7:23am</span></div><div><span class="suninfo__label text--secondary">Sunset: </span><span class="text--primary"> 4:46pm</span></div><style> .zci--answer .suninfo__label {display: inline-block; min-width: 90px}</style>'
|
||||
);
|
||||
|
||||
ddg_goodie_test([qw(
|
||||
|
|
Loading…
Reference in New Issue