summaryrefslogtreecommitdiff
path: root/node_modules/node-addon-api/doc/date.md
diff options
context:
space:
mode:
author8cy <[email protected]>2020-04-03 02:48:28 -0700
committer8cy <[email protected]>2020-04-03 02:48:28 -0700
commitf9159ea2d994e14180fb02ab562f0119513e67cf (patch)
tree09d14cdf05456567156738b681379d4bccd64e5c /node_modules/node-addon-api/doc/date.md
parent2020/04/03, 02:42, V1.2.1 (diff)
downloads5nical-f9159ea2d994e14180fb02ab562f0119513e67cf.tar.xz
s5nical-f9159ea2d994e14180fb02ab562f0119513e67cf.zip
2020/04/03, 02:47, V1.2.2
Diffstat (limited to 'node_modules/node-addon-api/doc/date.md')
-rw-r--r--node_modules/node-addon-api/doc/date.md68
1 files changed, 0 insertions, 68 deletions
diff --git a/node_modules/node-addon-api/doc/date.md b/node_modules/node-addon-api/doc/date.md
deleted file mode 100644
index 959b4b9..0000000
--- a/node_modules/node-addon-api/doc/date.md
+++ /dev/null
@@ -1,68 +0,0 @@
-# Date
-
-`Napi::Date` class is a representation of the JavaScript `Date` object. The
-`Napi::Date` class inherits its behavior from `Napi::Value` class
-(for more info see [`Napi::Value`](value.md))
-
-## Methods
-
-### Constructor
-
-Creates a new _empty_ instance of a `Napi::Date` object.
-
-```cpp
-Napi::Date::Date();
-```
-
-Creates a new _non-empty_ instance of a `Napi::Date` object.
-
-```cpp
-Napi::Date::Date(napi_env env, napi_value value);
-```
-
- - `[in] env`: The environment in which to construct the `Napi::Date` object.
- - `[in] value`: The `napi_value` which is a handle for a JavaScript `Date`.
-
-### New
-
-Creates a new instance of a `Napi::Date` object.
-
-```cpp
-static Napi::Date Napi::Date::New(Napi::Env env, double value);
-```
-
- - `[in] env`: The environment in which to construct the `Napi::Date` object.
- - `[in] value`: The time value the JavaScript `Date` will contain represented
- as the number of milliseconds since 1 January 1970 00:00:00 UTC.
-
-Returns a new instance of `Napi::Date` object.
-
-### ValueOf
-
-```cpp
-double Napi::Date::ValueOf() const;
-```
-
-Returns the time value as `double` primitive represented as the number of
- milliseconds since 1 January 1970 00:00:00 UTC.
-
-## Operators
-
-### operator double
-
-Converts a `Napi::Date` value to a `double` primitive.
-
-```cpp
-Napi::Date::operator double() const;
-```
-
-### Example
-
-The following shows an example of casting a `Napi::Date` value to a `double`
- primitive.
-
-```cpp
-double operatorVal = Napi::Date::New(Env(), 0); // Napi::Date to double
-// or
-auto instanceVal = info[0].As<Napi::Date>().ValueOf();
-```