Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

TimezoneConverter: switch HTML to template #1309

Merged
merged 4 commits into from
Jul 31, 2015
Merged

Conversation

cwallen
Copy link
Contributor

@cwallen cwallen commented Jul 20, 2015

Part of #1163

It drops the styles, but I didn't see a way to keep that without getting more custom than seemed worth it.

Before:
screenshot 2015-07-19 21 11 43

After:
screenshot 2015-07-19 21 06 20

@mintsoft
Copy link
Collaborator

@abeyang is the actual answer clear enough?

@abeyang
Copy link
Contributor

abeyang commented Jul 21, 2015

Hi @cwallen , this looks way better than before! However, let's put the direct answer first, and the query second. For example, your query should produce:

2:00 EST
Convert Timezone: 10:00 MSK to EST

-- and "8:00 msk to est" would produce:

23:00 EST (one day prior)
Convert Timezone: 8:00 MSK to EST

@cwallen
Copy link
Contributor Author

cwallen commented Jul 21, 2015

Ok, I can make those changes later tonight. Would it be better to show the input verbatim as entered, or parsed like in the first part of the current answer?

@mintsoft
Copy link
Collaborator

@cwallen I'd say parsed; that way if there's an issue it lets the user know how it was interpreted

@cwallen
Copy link
Contributor Author

cwallen commented Jul 23, 2015

@abeyang These look good?

screenshot 2015-07-23 08 47 22
screenshot 2015-07-23 08 47 42

@cwallen
Copy link
Contributor Author

cwallen commented Jul 29, 2015

Finally got some time to finish this up. Should look like my last screenshots above. Also did a bit of refactoring to clean up code that was doing the same thing over again for the input and output times.

$days = sprintf ', %i day%s prior', $_ / -24 + 1, $s;
$input->{time} = $hours + $minutes / 60 + $seconds / 3600 + $pm;
$output->{time} = $input->{time} + $modifier;
for ( $input, $output ) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could do for my $io ($input,$output);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@moollaza
Copy link
Member

@cwallen thanks a lot! This LGTM 👍

moollaza added a commit that referenced this pull request Jul 31, 2015
TimezoneConverter: switch HTML to template
@moollaza moollaza merged commit 502ba63 into duckduckgo:master Jul 31, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants