my-timezone 1.15.1 → 1.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -4
- package/dist/cli.js +0 -0
- package/package.json +2 -3
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# my-timezone [](https://www.gnu.org/licenses/gpl-3.0) [](https://www.npmjs.com/package/my-timezone)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Calculate the true solar time at any geographic location based on its longitude.
|
|
4
|
+
|
|
5
|
+
This is **not** political timezone data (UTC+1, DST, etc.) — it is [local mean time](https://en.wikipedia.org/wiki/Solar_time#Mean_solar_time): the astronomically correct time at a given longitude, where every degree equals exactly 4 minutes of offset from UTC. See [CS4FN](http://www.cs4fn.org/mobile/owntimezone.php) for a good explanation of the underlying concept.
|
|
4
6
|
|
|
5
7
|
## Prerequisites
|
|
6
8
|
|
|
@@ -21,7 +23,7 @@ Add the module to your project with `yarn add my-timezone` or install it globall
|
|
|
21
23
|
import {MyTimezone} from 'my-timezone';
|
|
22
24
|
|
|
23
25
|
new MyTimezone()
|
|
24
|
-
.
|
|
26
|
+
.getDateByAddress('Berlin, Germany')
|
|
25
27
|
.then(date => {
|
|
26
28
|
console.log(date.toString()); // Sun Sep 03 2017 14:29:49 GMT+0200
|
|
27
29
|
})
|
|
@@ -30,7 +32,7 @@ new MyTimezone()
|
|
|
30
32
|
// or
|
|
31
33
|
|
|
32
34
|
new MyTimezone()
|
|
33
|
-
.
|
|
35
|
+
.getDateByLongitude(13.394)
|
|
34
36
|
.then(date => {
|
|
35
37
|
console.log(date.toString()); // Sun Sep 03 2017 14:29:49 GMT+0200
|
|
36
38
|
})
|
|
@@ -42,7 +44,7 @@ new MyTimezone()
|
|
|
42
44
|
```
|
|
43
45
|
Usage: my-timezone [options] <location>
|
|
44
46
|
|
|
45
|
-
Get the
|
|
47
|
+
Get the true solar time based on your location.
|
|
46
48
|
Use a city name or longitude value as location.
|
|
47
49
|
|
|
48
50
|
Options:
|
package/dist/cli.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"commander": "14.0.3",
|
|
6
6
|
"ntpclient": "1.16.1"
|
|
7
7
|
},
|
|
8
|
-
"description": "
|
|
8
|
+
"description": "Calculate the true solar time at any geographic location.",
|
|
9
9
|
"devDependencies": {
|
|
10
10
|
"nock": "14.0.11",
|
|
11
11
|
"tsx": "4.21.0",
|
|
@@ -32,6 +32,5 @@
|
|
|
32
32
|
"test": "vitest run"
|
|
33
33
|
},
|
|
34
34
|
"type": "module",
|
|
35
|
-
"version": "1.15.
|
|
36
|
-
"gitHead": "aa42364cabdedc7bba727430cb686713f4598ce8"
|
|
35
|
+
"version": "1.15.2"
|
|
37
36
|
}
|