my-timezone 1.15.0 → 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 CHANGED
@@ -1,6 +1,8 @@
1
1
  # my-timezone [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) [![npm version](https://img.shields.io/npm/v/my-timezone.svg?style=flat)](https://www.npmjs.com/package/my-timezone)
2
2
 
3
- Get the exact time based on your location by calculating the time difference in seconds from UTC (good explanation on [CS4FN](http://www.cs4fn.org/mobile/owntimezone.php)).
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
- .getTimeByAddress('Berlin, Germany')
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
- .getTimeByLocation('13.394')
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 exact time based on your location.
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
@@ -3,14 +3,14 @@
3
3
  "bin": "dist/cli.js",
4
4
  "dependencies": {
5
5
  "commander": "14.0.3",
6
- "ntpclient": "1.16.0"
6
+ "ntpclient": "1.16.1"
7
7
  },
8
- "description": "Get the exact time based on your location.",
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",
12
12
  "typescript": "6.0.2",
13
- "vitest": "4.0.18"
13
+ "vitest": "4.1.0"
14
14
  },
15
15
  "engines": {
16
16
  "node": ">= 21"
@@ -32,6 +32,5 @@
32
32
  "test": "vitest run"
33
33
  },
34
34
  "type": "module",
35
- "version": "1.15.0",
36
- "gitHead": "146d587751b7319816e1a638bfa1b90197cad9bd"
35
+ "version": "1.15.2"
37
36
  }