-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
modified: crypto.js modified: index.js new file: public/utils.ejs -- function for unix-timestamp to local timestamp modified: views/pages/weatherbit.ejs
- Loading branch information
Showing
5 changed files
with
95 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,5 @@ node_modules | |
public/ePub | ||
views/header2.ejs | ||
index-temp.ejs | ||
utils.js | ||
public/AirQIdx_Guide.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<% | ||
unixTsToLocalTime = (unix_ts) => { | ||
// Create a new JavaScript Date object based on the timestamp | ||
// multiplied by 1000 so that the argument is in milliseconds, not seconds. | ||
var date = new Date(unix_ts * 1000); | ||
// Hours part from the timestamp | ||
var hours = date.getHours(); | ||
// Minutes part from the timestamp | ||
var minutes = "0" + date.getMinutes(); | ||
// Seconds part from the timestamp | ||
var seconds = "0" + date.getSeconds(); | ||
// Will display time in 10:30:23 format | ||
return hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2); | ||
} | ||
%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters