Skip to content

Commit a569197

Browse files
authored
Merge branch 'master' into master
2 parents 0a91929 + 940399b commit a569197

15 files changed

+2042
-1634
lines changed

.github/ISSUE_TEMPLATE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
**Tell us about your environment**
1414
- **exact http-server version:**
1515
- **Node version:**
16-
- **Platform:**
16+
- **OS:**
1717

1818
**Other information (related issues, suggestions for a fix, etc):**

.github/PULL_REQUEST_TEMPLATE

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
1+
**What changes did you make?**
2+
3+
**Provide some example code that this change will affect, if applicable:**
4+
5+
<!-- Paste the example code here: -->
6+
7+
**Is there anything you'd like reviewers to focus on?**
8+
19
**Please ensure that your pull request fulfills these requirements:**
210
- [ ] The pull request is being made against the `master` branch
311
- [ ] Tests for the changes have been added (for bug fixes / features)
12+
- [ ] New features/options have been documented in:
13+
- [ ] `http-server --help` text
14+
- [ ] README.md
15+
- [ ] doc/http-server.1
416

517
**What is the purpose of this pull request? (bug fix, enhancement, new feature,...)**
618

719
<!--
820
Link to the issue this pull request fixes here, if applicable: "Fixes #xxx" or "Resolves #xxx"
21+
22+
If your PR fixes multiple issues, list them individually like "Fixes #xx1, fixes #xx2, fixes #xx3". This is a quirk of how GitHub links issues.
923
-->
10-
11-
**What changes did you make?**
12-
13-
**Provide some example code that this change will affect, if applicable:**
14-
15-
<!-- Paste the example code here: -->
16-
17-
**Is there anything you'd like reviewers to focus on?**
18-
19-
**Please provide testing instructions, if applicable:**

lib/core/show-dir/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22

33
const styles = require('./styles');
4+
const lastModifiedToString = require('./last-modified-to-string');
45
const permsToString = require('./perms-to-string');
56
const sizeToString = require('./size-to-string');
67
const sortFiles = require('./sort-files');
@@ -114,6 +115,7 @@ module.exports = (opts) => {
114115
html += `<td class="perms"><code>(${permsToString(file[1])})</code></td>`;
115116
}
116117
html +=
118+
`<td class="last-modified">${lastModifiedToString(file[1])}</td>` +
117119
`<td class="file-size"><code>${sizeToString(file[1], humanReadable, si)}</code></td>` +
118120
`<td class="display-name"><a href="${href}">${displayName}</a></td>` +
119121
'</tr>\n';
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
'use strict';
2+
3+
module.exports = function lastModifiedToString(stat) {
4+
const t = new Date(stat.mtime);
5+
return (("0" + (t.getDate())).slice(-2) + '-' +
6+
t.toLocaleString('default', { month: 'short' }) + '-' +
7+
t.getFullYear() + ' ' +
8+
("0" + t.getHours()).slice(-2) + ':' +
9+
("0" + t.getMinutes()).slice(-2));
10+
};

0 commit comments

Comments
 (0)