Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #206 from JulianNorton/timezone-agnostic
Browse files Browse the repository at this point in the history
hacking together removing specific times
  • Loading branch information
JulianNorton committed Dec 3, 2018
2 parents 17e7437 + 7a45fe7 commit df24e95
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/modules/WeatherRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function WeatherRequest(req) {

this.setTimeZone = () => {
return timezone({
key: process.env.GOOGLE_API_KEY,
// key: process.env.GOOGLE_API_KEY,
location: req.params.latitude + ',' + req.params.longitude,
})
.then(res => {
Expand Down
2 changes: 1 addition & 1 deletion views/pages/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<header class="card card-block" id="weather-current">
<div>
<h3 class="small muted">
Now (updated: <%= moment.unix(currently.time).format(params.hoursFormat + ':mm')%><% if (params.hoursFormat === 'h') { %><span class="small-caps"><%= moment.unix(currently.time).format('a') %></span><% } %>)</h3>
Now (updated: <%= moment.unix(currently.time).fromNow()%>)</h3>
<div class="flex wrap status-primary">
<span class="center"><%= Math.round(currently.temperature) %>º<%= params.scale %></span>
<%# This only shows the image if it's IE9 and above %>
Expand Down
2 changes: 1 addition & 1 deletion views/partials/hourly.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
%>
<li>
<span class="small muted data-secondary">
<%= data.hourly[i].startTime ? moment.unix(data.hourly[i].startTime).format(params.hoursFormat + (params.hoursFormat === 'H' ? ':mm' : '')) + '-' : '' %><%= hourlyTime.format(params.hoursFormat + (params.hoursFormat === 'H' ? ':mm' : ''))%><% if (params.hoursFormat === 'h') { %><span class="small-caps"><%= hourlyTime.format('a') %></span>
<%= data.hourly[i].startTime ? moment.unix(data.hourly[i].startTime).fromNow() + ' and ' : '' %><%= hourlyTime.fromNow()%><% if (params.hoursFormat === 'h') { %>
<% } %>
</span>
<span class="m-x-1"><%= Math.round(data.hourly[i].temperature) %>º</span>
Expand Down
4 changes: 2 additions & 2 deletions views/partials/today.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
</p>
<p>
<span class="small">High</span> <%= Math.round(data.daily.apparentTemperatureMax) %>°
<span class="small forecast-inline-secondary"> at <%= moment.unix(data.daily.apparentTemperatureMaxTime).format(params.hoursFormat + ':mm')%><% if (params.hoursFormat === 'h') { %><span class="small-caps"><%= moment.unix(data.daily.apparentTemperatureMaxTime).format('a') %></span><% } %></span>
<span class="small forecast-inline-secondary"> at <%= moment.unix(data.daily.apparentTemperatureMaxTime).fromNow()%></span>
<span class="small">Low</span> <%= Math.round(data.daily.apparentTemperatureMin) %>°
<span class="small forecast-inline-secondary"> at <%= moment.unix(data.daily.apparentTemperatureMinTime).format(params.hoursFormat + ':mm')%><% if (params.hoursFormat === 'h') { %><span class="small-caps"><%= moment.unix(data.daily.apparentTemperatureMinTime).format('a') %></span><% } %></span>
<span class="small forecast-inline-secondary"> at <%= moment.unix(data.daily.apparentTemperatureMinTime).fromNow()%></span>
</p>
</div>
<!--[if gte IE 9]><!-->
Expand Down

0 comments on commit df24e95

Please sign in to comment.