One of the examples returns [Function] instead of an integer.
- Dominant language
- JavaScript
- Stars
- 256
- Forks
- 26
- PR merge metrics
- No merged PRs in 30d
Description
I was turning the examples into a test and ran into an error.
```
var ok = require("assert");
var eq = require("assert").equal;
var tz = require("timezone");
var y2k = tz("2000-01-01");
eq( y2k, 946684800000 );
eq( y2k, Date.UTC(2000, 0, 1));
eq( tz("1970-01-01"), 0);
ok( tz("1969-7-21 02:56") < 0);
Thrown:
{ [AssertionError [ERR_ASSERTION]: false == true]
generatedMessage: true,
name: 'AssertionError [ERR_ASSERTION]',
code: 'ERR_ASSERTION',
actual: false,
expected: true,
operator: '==' }
> tz("1969-7-21 02:56")
[Function]
```
I tried it both with a copy I was building for a Debian package, and a copy installed into a new directory with npm install timezone.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the assertions shown in the issue from the package examples, especially the 1969-7-21 02:56 case, and inspect why the result is displayed as [Function] rather than behaving as a negative number. Done means the example assertions pass and the returned value for that date compares correctly as an integer.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100