date-format 4.0.2 → 4.0.5

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md ADDED
@@ -0,0 +1,51 @@
1
+ # date-format Changelog
2
+
3
+ ## 4.0.5
4
+
5
+ - [chore(test): better test coverage instead of ignoring](https://github.com/nomiddlename/date-format/pull/48) - thanks [@peteriman](https://github.com/peteriman)
6
+ - [chore(dep): updated dependencies](https://github.com/nomiddlename/date-format/pull/49) - thanks [@peteriman](https://github.com/peteriman)
7
+ - eslint from 8.10.0 to 8.11.0
8
+ - mocha from 9.2.1 to 9.2.2
9
+ - package-lock.json
10
+ - [chore(docs): updated README.md with badges](https://github.com/nomiddlename/date-format/pull/50) thanks [@peteriman](https://github.com/peteriman)
11
+
12
+ ## 4.0.4
13
+
14
+ - Updated dependencies - thanks [@peteriman](https://github.com/peteriman)
15
+ - [eslint from 8.8.0 to 8.10.0 and mocha from 9.2.0 to 9.2.1](https://github.com/nomiddlename/date-format/pull/46)
16
+ - [eslint from 8.7.0 to 8.8.0 and mocha from 9.1.4 to 9.2.0](https://github.com/nomiddlename/date-format/pull/45)
17
+ - [package-lock.json](https://github.com/nomiddlename/date-format/pull/44)
18
+
19
+ ## 4.0.3
20
+
21
+ - [100% test coverage](https://github.com/nomiddlename/date-format/pull/42) - thanks [@peteriman](https://github.com/peteriman)
22
+ - Updated dependencies - thanks [@peteriman](https://github.com/peteriman)
23
+ - [eslint from 8.6.0 to 8.7.0 and mocha from 9.1.3 to 9.1.4](https://github.com/nomiddlename/date-format/pull/41)
24
+
25
+ ## 4.0.2
26
+
27
+ - [Not to publish misc files to NPM](https://github.com/nomiddlename/date-format/pull/39) - thanks [@peteriman](https://github.com/peteriman)
28
+ - CHANGELOG.md
29
+ - [Removed "log4js" from title of CHANGELOG.md](https://github.com/nomiddlename/date-format/pull/37) - thanks [@joshuabremerdexcom](https://github.com/joshuabremerdexcom)
30
+ - [Added "date-format" to title of CHANGELOG.md](https://github.com/nomiddlename/date-format/commit/64a95d0386853692d7d65174f94a0751e775f7ce#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed) - thanks [@peteriman](https://github.com/peteriman)
31
+ - Updated dependencies - thanks [@peteriman](https://github.com/peteriman)
32
+ - [eslint-plugin-mocha from 5.3.0 to 10.0.3](https://github.com/nomiddlename/date-format/pull/38)
33
+
34
+ ## 4.0.1
35
+
36
+ - is exactly the same as 4.0.0 and is a re-published 4.0.0 to npm
37
+
38
+ ## 4.0.0
39
+
40
+ - [Fix timezone format to include colon separator](https://github.com/nomiddlename/date-format/pull/27) - thanks [@peteriman](https://github.com/peteriman)
41
+ - [test: have a test case for timezone with colon](https://github.com/nomiddlename/date-format/pull/32) - thanks [@peteriman](https://github.com/peteriman)
42
+ - [Docs: Updated README.md with more examples and expected output](https://github.com/nomiddlename/date-format/pull/33) - thanks [@peteriman](https://github.com/peteriman)
43
+ - Updated dependencies
44
+ - [should-util from 1.0.0 to 1.0.1](https://github.com/nomiddlename/date-format/pull/31) - thanks [@peteriman](https://github.com/peteriman)
45
+ - [eslint from 5.16.0 to 8.6.0 and mocha from 5.2.0 to 9.1.3](https://github.com/nomiddlename/date-format/pull/30) - thanks [@peteriman](https://github.com/peteriman)
46
+ - [acorn from 6.2.0 to 6.4.2](https://github.com/nomiddlename/date-format/pull/29) - thanks [@Dependabot](https://github.com/dependabot)
47
+ - [lodash from 4.17.14 to 4.17.21](https://github.com/nomiddlename/date-format/pull/26) - thanks [@Dependabot](https://github.com/dependabot)
48
+
49
+ ## Previous versions
50
+
51
+ Change information for older versions can be found by looking at the milestones in github.
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
- date-format
1
+ date-format [![CodeQL](https://github.com/nomiddlename/date-format/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/nomiddlename/date-format/actions/workflows/codeql-analysis.yml) [![Node.js CI](https://github.com/nomiddlename/date-format/actions/workflows/node.js.yml/badge.svg)](https://github.com/nomiddlename/date-format/actions/workflows/node.js.yml)
2
2
  ===========
3
3
 
4
+ [![NPM](https://nodei.co/npm/date-format.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/date-format/)
5
+
4
6
  node.js formatting of Date objects as strings. Probably exactly the same as some other library out there.
5
7
 
6
8
  ```sh
package/lib/index.js CHANGED
@@ -21,12 +21,8 @@ function offset(timezoneOffset) {
21
21
  var os = Math.abs(timezoneOffset);
22
22
  var h = String(Math.floor(os / 60));
23
23
  var m = String(os % 60);
24
- if (h.length === 1) {
25
- h = "0" + h;
26
- }
27
- if (m.length === 1) {
28
- m = "0" + m;
29
- }
24
+ h = ("0" + h).slice(-2);
25
+ m = ("0" + m).slice(-2);
30
26
  return timezoneOffset === 0 ? "Z" : (timezoneOffset < 0 ? "+" : "-") + h + ":" + m;
31
27
  }
32
28
 
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "date-format",
3
- "version": "4.0.2",
3
+ "version": "4.0.5",
4
4
  "description": "Formatting Date objects as strings since 2013",
5
5
  "main": "lib/index.js",
6
6
  "files": [
7
- "lib"
7
+ "lib",
8
+ "CHANGELOG.md"
8
9
  ],
9
10
  "repository": {
10
11
  "type": "git",
@@ -16,7 +17,7 @@
16
17
  "scripts": {
17
18
  "lint": "eslint lib/* test/*",
18
19
  "pretest": "eslint lib/* test/*",
19
- "test": "mocha"
20
+ "test": "nyc --check-coverage mocha"
20
21
  },
21
22
  "keywords": [
22
23
  "date",
@@ -28,9 +29,18 @@
28
29
  "readmeFilename": "README.md",
29
30
  "gitHead": "bf59015ab6c9e86454b179374f29debbdb403522",
30
31
  "devDependencies": {
31
- "eslint": "^8.6.0",
32
+ "eslint": "^8.11.0",
32
33
  "eslint-plugin-mocha": "^10.0.3",
33
- "mocha": "^9.1.3",
34
+ "mocha": "^9.2.2",
35
+ "nyc": "^15.1.0",
34
36
  "should": "^13.2.3"
37
+ },
38
+ "nyc": {
39
+ "include": [
40
+ "lib/**"
41
+ ],
42
+ "branches": 100,
43
+ "lines": 100,
44
+ "functions": 100
35
45
  }
36
46
  }