file stringlengths 16 94 | text stringlengths 32 24.4k | vector list |
|---|---|---|
javascript/reference/global_objects/reflect/get/index.md | JavaScript - Global Objects - Reflect - get - Description:
`Reflect.get()` provides the reflective semantic of a property access. That is, `Reflect.get(target, propertyKey, receiver)` is semantically equivalent to:
Example:
target[propertyKey];
Note that in a normal property access, `target` and `receiver` would ob... | [
-1.3956784009933472,
0.17742489278316498,
-1.4432989358901978,
0.05827588587999344,
-0.428799033164978,
-2.066882371902466,
0.13852521777153015,
0.08949727565050125,
-0.09802945703268051,
-0.056892041116952896,
-0.2921285033226013,
0.2419768124818802,
-1.3466657400131226,
0.164345547556877... |
javascript/reference/global_objects/reflect/get/index.md | JavaScript - Global Objects - Reflect - get - Examples - Using Reflect.get():
Example:
// Object
const obj1 = { x: 1, y: 2 };
Reflect.get(obj1, "x"); // 1
// Array
Reflect.get(["zero", "one"], 1); // "one"
// Proxy with a get handler
const obj2 = new Proxy(
{ p: 1 },
{
get(t, k, r) {
return `${k}bar`;... | [
-0.5585424304008484,
-0.056731216609478,
-0.8615091443061829,
0.24653097987174988,
0.28142592310905457,
-0.46286287903785706,
-0.2414018213748932,
-0.055011339485645294,
-0.159263014793396,
-0.1936778426170349,
-0.4263853430747986,
-0.0730159729719162,
-0.24640920758247375,
0.6175848841667... |
javascript/reference/global_objects/reflect/isextensible/index.md | JavaScript - Global Objects - Reflect - isExtensible:
The `Reflect.isExtensible()` static method is like `Object.isExtensible()`. It determines if an object is extensible (whether it can have new properties added to it).
Example:
const object1 = {};
console.log(Reflect.isExtensible(object1));
// Expected output: tr... | [
-1.803037166595459,
-0.5182508826255798,
-0.524357795715332,
0.6533684134483337,
-0.11404531449079514,
-2.1751067638397217,
0.7367894053459167,
0.16290298104286194,
0.3898523449897766,
0.2936537563800812,
-1.0648577213287354,
0.05179474875330925,
-0.422879695892334,
0.22824858129024506,
... |
javascript/reference/global_objects/reflect/isextensible/index.md | JavaScript - Global Objects - Reflect - isExtensible - Syntax:
Example:
Reflect.isExtensible(target) | [
-1.3733253479003906,
0.011542215012013912,
-0.47412076592445374,
0.1574479341506958,
-1.018395185470581,
-1.8441728353500366,
0.852985143661499,
0.15646323561668396,
0.17241786420345306,
-0.3642742931842804,
-0.5548360347747803,
0.4692053496837616,
-0.7578426003456116,
0.11042419821023941,... |
javascript/reference/global_objects/reflect/isextensible/index.md | JavaScript - Global Objects - Reflect - isExtensible - Syntax - Parameters:
- `target`: The target object which to check if it is extensible. | [
-1.044092059135437,
-0.15220622718334198,
-0.7395626306533813,
0.06739380955696106,
-0.43503066897392273,
-2.0195086002349854,
0.888306736946106,
0.04744362086057663,
0.47630801796913147,
-0.3310818374156952,
-1.2039108276367188,
0.7050959467887878,
-0.8685925602912903,
0.39516595005989075... |
javascript/reference/global_objects/reflect/isextensible/index.md | JavaScript - Global Objects - Reflect - isExtensible - Syntax - Return value:
A `Boolean` indicating whether or not the target is extensible. | [
-1.3951737880706787,
-0.32362985610961914,
-0.5980370044708252,
0.049948111176490784,
-0.9114988446235657,
-1.8480322360992432,
0.9873278737068176,
0.5831197500228882,
0.4159424602985382,
-0.27280256152153015,
-0.9485504627227783,
1.1303120851516724,
-0.42140689492225647,
0.718899250030517... |
javascript/reference/global_objects/reflect/isextensible/index.md | JavaScript - Global Objects - Reflect - isExtensible - Syntax - Exceptions:
- `TypeError`: Thrown if `target` is not an object. | [
-1.0651605129241943,
-0.19236110150814056,
-0.4758344888687134,
0.151493638753891,
-0.8137279152870178,
-1.2342666387557983,
0.24763451516628265,
0.2661738097667694,
-0.49701809883117676,
-0.3379696309566498,
-0.14114315807819366,
-0.0985378548502922,
-0.6073426008224487,
-0.54299038648605... |
javascript/reference/global_objects/reflect/isextensible/index.md | JavaScript - Global Objects - Reflect - isExtensible - Description:
`Reflect.isExtensible()` provides the reflective semantic of checking if an object is extensible. The only difference with `Object.isExtensible()` is how non-object targets are handled. `Reflect.isExtensible()` throws a `TypeError` if the target is no... | [
-1.7228883504867554,
-0.7709408402442932,
-0.577389657497406,
0.3592514097690582,
-0.6147736310958862,
-2.1520607471466064,
0.7331843972206116,
-0.07465904206037521,
0.3998974561691284,
-0.1452832818031311,
-1.0456187725067139,
0.09648796916007996,
-0.5616458654403687,
0.1412365436553955,
... |
javascript/reference/global_objects/reflect/isextensible/index.md | JavaScript - Global Objects - Reflect - isExtensible - Examples - Using Reflect.isExtensible():
See also `Object.isExtensible()`.
Example:
// New objects are extensible.
const empty = {};
Reflect.isExtensible(empty); // true
// … but that can be changed.
Reflect.preventExtensions(empty);
Reflect.isExtensible(empty)... | [
-1.3906140327453613,
-0.015606419183313847,
-0.4777531027793884,
0.5935744643211365,
-0.34646233916282654,
-2.389896869659424,
0.3086634576320648,
0.3046177327632904,
0.11692047864198685,
-0.10093320906162262,
-0.7323593497276306,
0.539633572101593,
-0.5719654560089111,
0.2739119529724121,... |
javascript/reference/global_objects/reflect/isextensible/index.md | JavaScript - Global Objects - Reflect - isExtensible - Examples - Difference with Object.isExtensible():
If the `target` argument to this method is not an object (a primitive), then it will cause a `TypeError`. With `Object.isExtensible()`, a non-object `target` will return false without any errors.
Example:
Reflect... | [
-1.6356422901153564,
-0.4156980514526367,
-0.4096391797065735,
-0.11258174479007721,
-0.5280093550682068,
-1.8114744424819946,
0.7221316695213318,
0.07837581634521484,
0.02043304219841957,
-0.1907341480255127,
-0.5578072667121887,
-0.13042448461055756,
-0.45200037956237793,
-0.590315043926... |
javascript/reference/global_objects/reflect/getownpropertydescriptor/index.md | JavaScript - Global Objects - Reflect - getOwnPropertyDescriptor:
The `Reflect.getOwnPropertyDescriptor()` static method is like `Object.getOwnPropertyDescriptor()`. It returns a property descriptor of the given property if it exists on the object, `undefined` otherwise.
Example:
const object = {
property1: 42,
};... | [
-1.8429784774780273,
-0.6097629070281982,
-1.0865586996078491,
0.29692408442497253,
-0.2256338894367218,
-1.2031797170639038,
-0.020440999418497086,
0.08576178550720215,
0.505776584148407,
0.3084648847579956,
-0.5491348505020142,
0.678101658821106,
-0.27065932750701904,
-0.0213040132075548... |
javascript/reference/global_objects/reflect/getownpropertydescriptor/index.md | JavaScript - Global Objects - Reflect - getOwnPropertyDescriptor - Syntax:
Example:
Reflect.getOwnPropertyDescriptor(target, propertyKey) | [
-2.0800013542175293,
0.22132211923599243,
-1.0206778049468994,
-0.10242048650979996,
-0.9651904106140137,
-1.4601327180862427,
0.09606517106294632,
-0.07529783993959427,
0.08182162046432495,
-0.030030332505702972,
-0.35284891724586487,
0.7723256349563599,
-0.6979371309280396,
-0.0313249044... |
javascript/reference/global_objects/reflect/getownpropertydescriptor/index.md | JavaScript - Global Objects - Reflect - getOwnPropertyDescriptor - Syntax - Parameters:
- `target`: The target object in which to look for the property.
- `propertyKey`: The name of the property to get an own property descriptor for. | [
-1.2820382118225098,
0.05200887471437454,
-1.2744287252426147,
-0.22989638149738312,
-0.47507330775260925,
-1.2711055278778076,
0.3891509771347046,
-0.2781917452812195,
0.5580868721008301,
-0.005896933376789093,
-0.8276795148849487,
1.075003743171692,
-1.3157262802124023,
0.274886518716812... |
javascript/reference/global_objects/reflect/getownpropertydescriptor/index.md | JavaScript - Global Objects - Reflect - getOwnPropertyDescriptor - Syntax - Return value:
A property descriptor object if the property exists as an own property of `target`; otherwise, `undefined`. | [
-1.3598344326019287,
-0.09684563428163528,
-0.7736586928367615,
0.4764880836009979,
-0.7712504267692566,
-0.8681032061576843,
0.746338427066803,
0.41938233375549316,
0.37486615777015686,
0.3868114948272705,
-0.7234535813331604,
0.770897626876831,
-0.6495115160942078,
0.2810066342353821,
... |
javascript/reference/global_objects/reflect/getownpropertydescriptor/index.md | JavaScript - Global Objects - Reflect - getOwnPropertyDescriptor - Syntax - Exceptions:
- `TypeError`: Thrown if `target` is not an object. | [
-1.5255430936813354,
-0.17977499961853027,
-0.7332492470741272,
0.04759043827652931,
-0.711284875869751,
-0.6941311955451965,
0.1409492939710617,
0.24022933840751648,
-0.33348265290260315,
-0.17253853380680084,
-0.2702350318431854,
-0.0008263849304057658,
-0.7204276919364929,
-0.5727857351... |
javascript/reference/global_objects/reflect/getownpropertydescriptor/index.md | JavaScript - Global Objects - Reflect - getOwnPropertyDescriptor - Description:
`Reflect.getOwnPropertyDescriptor()` provides the reflective semantic of retrieving the property descriptor of an object. The only difference with `Object.getOwnPropertyDescriptor()` is how non-object targets are handled. `Reflect.getOwnPr... | [
-1.7932465076446533,
-0.1906496286392212,
-1.2018696069717407,
0.024372557178139687,
-0.3904285728931427,
-1.5020285844802856,
0.19601072371006012,
-0.28101885318756104,
0.40759605169296265,
0.25921931862831116,
-1.0601447820663452,
0.4884871542453766,
-0.8529428839683533,
0.25647917389869... |
javascript/reference/global_objects/reflect/getownpropertydescriptor/index.md | JavaScript - Global Objects - Reflect - getOwnPropertyDescriptor - Examples - Using Reflect.getOwnPropertyDescriptor():
Example:
Reflect.getOwnPropertyDescriptor({ x: "hello" }, "x");
// {value: "hello", writable: true, enumerable: true, configurable: true}
Reflect.getOwnPropertyDescriptor({ x: "hello" }, "y");
// u... | [
-1.7271740436553955,
0.32781580090522766,
-0.7525573968887329,
0.4988507926464081,
-0.9282909035682678,
-1.7567414045333862,
0.29767006635665894,
-0.28105878829956055,
0.19184304773807526,
0.3257274925708771,
-0.4771214723587036,
0.5553826689720154,
-0.29851824045181274,
-0.368160754442214... |
javascript/reference/global_objects/reflect/getownpropertydescriptor/index.md | JavaScript - Global Objects - Reflect - getOwnPropertyDescriptor - Examples - Difference with Object.getOwnPropertyDescriptor():
If the `target` argument to this method is not an object (a primitive), then it will cause a `TypeError`. With `Object.getOwnPropertyDescriptor`, a non-object first argument will be coerced ... | [
-1.6123350858688354,
-0.3465896546840668,
-0.715434730052948,
-0.06911218911409378,
-0.4233520030975342,
-1.1250698566436768,
0.390205979347229,
0.16044193506240845,
0.3416137993335724,
0.4118560552597046,
-0.7484332323074341,
-0.5944611430168152,
-0.6966221332550049,
-0.929476797580719,
... |
javascript/reference/global_objects/reflect/apply/index.md | JavaScript - Global Objects - Reflect - apply:
The `Reflect.apply()` static method calls a target function with arguments as specified.
Example:
console.log(Reflect.apply(Math.floor, undefined, [1.75]));
// Expected output: 1
console.log(
Reflect.apply(String.fromCharCode, undefined, [104, 101, 108, 108, 111]),
)... | [
-1.5498427152633667,
-0.206007719039917,
-1.211983561515808,
0.5503570437431335,
-0.08623667806386948,
-2.009833574295044,
0.015468182973563671,
-0.38327786326408386,
-0.08216230571269989,
0.10867174714803696,
-0.630221962928772,
0.43016737699508667,
0.2581610679626465,
0.24653370678424835... |
javascript/reference/global_objects/reflect/apply/index.md | JavaScript - Global Objects - Reflect - apply - Syntax:
Example:
Reflect.apply(target, thisArgument, argumentsList) | [
-1.2766846418380737,
0.1434529721736908,
-0.194637268781662,
0.25875547528266907,
-1.0693761110305786,
-1.9704906940460205,
0.6990953087806702,
0.004144143313169479,
0.09353642165660858,
-0.543010413646698,
-0.573222815990448,
0.25251832604408264,
-0.5384487509727478,
0.4378623068332672,
... |
javascript/reference/global_objects/reflect/apply/index.md | JavaScript - Global Objects - Reflect - apply - Syntax - Parameters:
- `target`: The target function to call.
- `thisArgument`: The value of `this` provided for the call to `target`.
- `argumentsList`: An array-like object specifying the arguments with which `target` should be called. | [
-0.9617578983306885,
-0.24004177749156952,
-0.6981847882270813,
0.08072344958782196,
-0.5968660712242126,
-2.2932868003845215,
0.508322536945343,
-0.287196546792984,
0.1526583582162857,
-0.1562526822090149,
-0.9903181195259094,
0.49446243047714233,
-0.6967481970787048,
0.5511805415153503,
... |
javascript/reference/global_objects/reflect/apply/index.md | JavaScript - Global Objects - Reflect - apply - Syntax - Return value:
The result of calling the given `target` function with the specified `this` value and arguments. | [
-0.6744720339775085,
-0.04608656466007233,
-0.932728111743927,
0.07777095586061478,
-0.8229511976242065,
-1.1616168022155762,
0.4137839376926422,
0.03719734400510788,
0.000521564157679677,
-0.04628082737326622,
-0.6874955892562866,
0.8877765536308289,
-0.2912260591983795,
1.177648901939392... |
javascript/reference/global_objects/reflect/apply/index.md | JavaScript - Global Objects - Reflect - apply - Syntax - Exceptions:
- `TypeError`: Thrown if `target` is not a function or `argumentsList` is not an object. | [
-1.1724364757537842,
-0.5016996264457703,
-0.4532875120639801,
0.1831997185945511,
-0.6720709800720215,
-1.61676025390625,
0.3178159296512604,
0.0895194411277771,
-0.3860798478126526,
-0.20364955067634583,
-0.39521002769470215,
-0.2854054868221283,
-0.4010717272758484,
-0.16481949388980865... |
javascript/reference/global_objects/reflect/apply/index.md | JavaScript - Global Objects - Reflect - apply - Description:
`Reflect.apply()` provides the reflective semantic of a function call. That is, `Reflect.apply(target, thisArgument, argumentsList)` is semantically equivalent to:
Example:
Math.floor.apply(null, [1.75]);
Reflect.apply(Math.floor, null, [1.75]);
The only ... | [
-1.6341322660446167,
0.10252051800489426,
-0.9667991399765015,
0.20926804840564728,
-0.12759438157081604,
-2.0476531982421875,
0.12445303797721863,
0.03886722773313522,
-0.1918066143989563,
0.07765323668718338,
-0.5299665331840515,
0.2668655216693878,
-0.0899621993303299,
0.519843876361846... |
javascript/reference/global_objects/reflect/apply/index.md | JavaScript - Global Objects - Reflect - apply - Examples - Using Reflect.apply():
Example:
Reflect.apply(Math.floor, undefined, [1.75]);
// 1;
Reflect.apply(String.fromCharCode, undefined, [104, 101, 108, 108, 111]);
// "hello"
Reflect.apply(RegExp.prototype.exec, /ab/, ["confabulation"]).index;
// 4
Reflect.apply... | [
-1.373584270477295,
0.5564252734184265,
-0.6188235878944397,
0.1887660026550293,
-0.31658706068992615,
-1.5426406860351562,
0.17850150167942047,
-0.4143720865249634,
-0.322793573141098,
-0.20361801981925964,
-0.6738925576210022,
0.18731307983398438,
-0.1972881257534027,
0.1388903111219406,... |
javascript/reference/global_objects/date/index.md | JavaScript - Global Objects - Date:
JavaScript `Date` objects represent a single moment in time in a platform-independent format. `Date` objects encapsulate an integral number that represents milliseconds since the midnight at the beginning of January 1, 1970, UTC (the epoch).
Note: With the introduction of the `Temp... | [
-1.0979290008544922,
-0.04545349255204201,
-0.9099385738372803,
0.3101505637168884,
-0.10216187685728073,
-1.8201102018356323,
0.5519051551818848,
0.5330180525779724,
-0.5979005694389343,
0.20554693043231964,
-0.16309218108654022,
0.14334769546985626,
0.3829320967197418,
0.0696219652891159... |
javascript/reference/global_objects/date/index.md | JavaScript - Global Objects - Date - Description - The epoch, timestamps, and invalid date:
A JavaScript date is fundamentally specified as the time in milliseconds that has elapsed since the epoch, which is defined as the midnight at the beginning of January 1, 1970, UTC (equivalent to the UNIX epoch). This timestamp... | [
0.004295055754482746,
-0.48784705996513367,
-0.43549078702926636,
0.9959924817085266,
0.7777674198150635,
-0.7353526949882507,
0.15632639825344086,
1.0764756202697754,
-0.6264048218727112,
-0.21353723108768463,
0.017541056498885155,
0.5788803100585938,
-0.1624452769756317,
0.18369011580944... |
javascript/reference/global_objects/date/index.md | JavaScript - Global Objects - Date - Description - Date components and time zones:
A date is represented internally as a single number, the timestamp. When interacting with it, the timestamp needs to be interpreted as a structured date-and-time representation. There are always two ways to interpret a timestamp: as a l... | [
0.26063263416290283,
0.3025997579097748,
-0.7645857334136963,
0.8490335941314697,
0.38188377022743225,
-1.1709150075912476,
0.1933639496564865,
1.389438509941101,
-0.6241087317466736,
-0.26282820105552673,
-0.3016396164894104,
0.7601516246795654,
-0.015773477032780647,
0.45902639627456665,... |
javascript/reference/global_objects/date/index.md | JavaScript - Global Objects - Date - Description - Date time string format:
There are many ways to format a date as a string. The JavaScript specification only specifies one format to be universally supported: the date time string format, a simplification of the ISO 8601 calendar date extended format. The format is as... | [
-0.7725263237953186,
0.22619940340518951,
-1.1466087102890015,
0.6309194564819336,
0.6210064888000488,
-1.7647535800933838,
-0.02236611396074295,
0.8140249252319336,
-0.7290875911712646,
-0.05056683346629143,
0.31669238209724426,
0.35355955362319946,
-0.22122277319431305,
0.667796909809112... |
javascript/reference/global_objects/date/index.md | JavaScript - Global Objects - Date - Description - Other ways to format a date:
- `toISOString()` returns a string in the format `1970-01-01T00:00:00.000Z` (the date time string format introduced above, which is simplified ISO 8601). `toJSON()` calls `toISOString()` and returns the result.
- `toString()` returns a str... | [
-1.0561187267303467,
0.6758162975311279,
-0.26872843503952026,
0.634232759475708,
0.6532482504844666,
-0.5071518421173096,
0.6026976704597473,
-0.11183518916368484,
-0.49896836280822754,
-0.3557378947734833,
-0.13338109850883484,
-0.7418347001075745,
0.06283187121152878,
0.6139390468597412... |
javascript/reference/global_objects/date/index.md | JavaScript - Global Objects - Date - Constructor:
- `Date()`: When called as a constructor, returns a new `Date` object. When called as a function, returns a string representation of the current date and time. | [
-0.9637911915779114,
-0.3002062439918518,
-1.2429696321487427,
0.5116841197013855,
0.10662932693958282,
-2.161813735961914,
-0.44444534182548523,
0.9688067436218262,
-0.7339591383934021,
0.26454198360443115,
-0.21613314747810364,
0.18762338161468506,
0.37553873658180237,
0.0716054961085319... |
javascript/reference/global_objects/date/index.md | JavaScript - Global Objects - Date - Static methods:
- `Date.now()`: Returns the numeric value corresponding to the current time—the number of milliseconds since January 1, 1970 00:00:00 UTC, with leap seconds ignored.
- `Date.parse()`: Parses a string representation of a date and returns the number of milliseconds si... | [
-1.1228054761886597,
0.19906999170780182,
-0.8390491604804993,
0.3073785901069641,
0.21819444000720978,
-1.1900150775909424,
0.5127726793289185,
0.07009311765432358,
-0.05286257341504097,
0.4034728407859802,
-0.775092601776123,
0.5160467028617859,
0.5710776448249817,
0.10336044430732727,
... |
javascript/reference/global_objects/date/index.md | JavaScript - Global Objects - Date - Instance properties:
These properties are defined on `Date.prototype` and shared by all `Date` instances.
- `Date.prototype.constructor`: The constructor function that created the instance object. For `Date` instances, the initial value is the `Date` constructor. | [
-0.41227808594703674,
-0.5765861868858337,
-1.11037015914917,
0.727220356464386,
0.13049308955669403,
-1.9130852222442627,
-0.2108396738767624,
1.009660005569458,
0.0503430999815464,
-0.05531859025359154,
-0.976394534111023,
0.0880964919924736,
0.036318596452474594,
0.3592332899570465,
0... |
javascript/reference/global_objects/date/index.md | JavaScript - Global Objects - Date - Instance methods:
- `Date.prototype.getDate()`: Returns the day of the month (`1` – `31`) for the specified date according to local time.
- `Date.prototype.getDay()`: Returns the day of the week (`0` – `6`) for the specified date according to local time.
- `Date.prototype.getFullYe... | [
0.5472797751426697,
0.3902031183242798,
-0.4158887267112732,
0.4322362244129181,
0.5891299247741699,
-1.3364559412002563,
0.45431968569755554,
1.0290189981460571,
-0.8675700426101685,
0.02382052130997181,
-0.8100588321685791,
0.9327913522720337,
0.191102996468544,
0.5023166537284851,
-0.... |
javascript/reference/global_objects/date/index.md | JavaScript - Global Objects - Date - Examples - Several ways to create a Date object:
The following examples show several ways to create JavaScript dates:
Note: Creating a date from a string has a lot of behavior inconsistencies. See date time string format for caveats on using different formats.
Example:
const tod... | [
-0.28270483016967773,
-0.3312337100505829,
-0.9793165326118469,
0.8818414807319641,
0.16594015061855316,
-1.5500997304916382,
0.2689550817012787,
0.05386817082762718,
-0.36946532130241394,
-0.08582872897386551,
-0.17257219552993774,
0.37122225761413574,
-0.4247344434261322,
-0.277968972921... |
javascript/reference/global_objects/date/index.md | JavaScript - Global Objects - Date - Examples - Formats of toString method return values:
Example:
const date = new Date("2020-05-12T23:50:21.817Z");
date.toString(); // Tue May 12 2020 18:50:21 GMT-0500 (Central Daylight Time)
date.toDateString(); // Tue May 12 2020
date.toTimeString(); // 18:50:21 GMT-0500 (Central... | [
-1.0977989435195923,
0.2920055389404297,
-0.4938131272792816,
-0.4991147220134735,
-0.3584209680557251,
-1.7085599899291992,
-0.3695387840270996,
0.21061478555202484,
-0.16297271847724915,
-0.13119742274284363,
-0.6352241039276123,
0.1600419282913208,
0.601408064365387,
-0.0366161912679672... |
javascript/reference/global_objects/date/index.md | JavaScript - Global Objects - Date - Examples - To get Date, Month and Year or Time:
Example:
const date = new Date("2000-01-17T16:45:30");
const [month, day, year] = [
date.getMonth(),
date.getDate(),
date.getFullYear(),
];
// [0, 17, 2000] as month are 0-indexed
const [hour, minutes, seconds] = [
date.getHo... | [
-0.052628081291913986,
0.3442964255809784,
-1.3242473602294922,
-0.11341968923807144,
-0.20552247762680054,
-1.8961261510849,
-0.4094427824020386,
0.4558136463165283,
0.009340645745396614,
0.08030487596988678,
-0.13684937357902527,
0.12339112162590027,
-0.021279484033584595,
-0.04982859268... |
javascript/reference/global_objects/date/index.md | JavaScript - Global Objects - Date - Examples - Interpretation of two-digit years:
`new Date()` exhibits legacy undesirable, inconsistent behavior with two-digit year values; specifically, when a `new Date()` call is given a two-digit year value, that year value does not get treated as a literal year and used as-is bu... | [
-1.499271273612976,
0.13377875089645386,
-1.3483079671859741,
0.5823501944541931,
0.07763055711984634,
-1.3310022354125977,
-0.6095343828201294,
0.6442230939865112,
-0.5345569849014282,
0.23842816054821014,
-0.8299694061279297,
1.196632981300354,
-0.6545215249061584,
0.5234354734420776,
... |
javascript/reference/global_objects/date/index.md | JavaScript - Global Objects - Date - Examples - Calculating elapsed time:
The following examples show how to determine the elapsed time between two JavaScript dates in milliseconds.
Due to the differing lengths of days (due to daylight saving changeover), months, and years, expressing elapsed time in units greater th... | [
-1.2450270652770996,
-0.12504346668720245,
-0.8700020909309387,
0.7267787456512451,
0.13178697228431702,
-0.9511404633522034,
0.03861655294895172,
-0.0006585574592463672,
-0.37668368220329285,
0.5884226560592651,
-0.3106546401977539,
-0.06747699528932571,
-0.15955479443073273,
0.3537029027... |
javascript/reference/global_objects/date/index.md | JavaScript - Global Objects - Date - Examples - Get the number of seconds since the ECMAScript Epoch:
Example:
const seconds = Math.floor(Date.now() / 1000);
In this case, it's important to return only an integer—so a simple division won't do. It's also important to only return actually elapsed seconds. (That's why ... | [
-0.9518426060676575,
-0.11208712309598923,
-0.5918871760368347,
-0.29176732897758484,
-0.371801495552063,
-1.1062264442443848,
0.3329199254512787,
-0.14395739138126373,
-0.23484307527542114,
-0.10440351814031601,
0.2818725109100342,
1.0115984678268433,
-0.1844552606344223,
-0.0180837027728... |
javascript/reference/global_objects/date/utc/index.md | JavaScript - Global Objects - Date - UTC:
The `Date.UTC()` static method accepts parameters representing the date and time components similar to the `Date` constructor, but treats them as UTC. It returns the number of milliseconds since January 1, 1970, 00:00:00 UTC.
Example:
const utcDate1 = new Date(Date.UTC(96, 1... | [
-1.134946584701538,
-0.14902769029140472,
-1.8355470895767212,
0.4740261435508728,
0.044034093618392944,
-1.3478235006332397,
0.3247804641723633,
0.07105608284473419,
0.012485850602388382,
0.6506183743476868,
-0.2786743938922882,
0.974743127822876,
0.6868545413017273,
0.2957179546356201,
... |
javascript/reference/global_objects/date/utc/index.md | JavaScript - Global Objects - Date - UTC - Syntax:
Example:
Date.UTC(year)
Date.UTC(year, monthIndex)
Date.UTC(year, monthIndex, day)
Date.UTC(year, monthIndex, day, hours)
Date.UTC(year, monthIndex, day, hours, minutes)
Date.UTC(year, monthIndex, day, hours, minutes, seconds)
Date.UTC(year, monthIndex, day, hours, m... | [
-0.5719029903411865,
0.41464298963546753,
-1.4587831497192383,
-0.057901185005903244,
-0.5040298104286194,
-1.9132746458053589,
-0.2777324616909027,
0.06077631935477257,
0.010465402156114578,
-0.4328821301460266,
-0.35456031560897827,
0.4193805456161499,
0.31094637513160706,
0.309951901435... |
javascript/reference/global_objects/date/utc/index.md | JavaScript - Global Objects - Date - UTC - Syntax - Parameters:
- `year`: Integer value representing the year. Values from `0` to `99` map to the years `1900` to `1999`. All other values are the actual year. See the example.
- `monthIndex` (optional): Integer value representing the month, beginning with `0` for Januar... | [
-1.0478273630142212,
0.15819919109344482,
-1.0727627277374268,
0.08794619888067245,
-0.12917615473270416,
-1.965733528137207,
0.29522794485092163,
0.12104543298482895,
0.013014323078095913,
0.359280526638031,
-0.750039279460907,
0.4837132692337036,
0.20741219818592072,
0.3962222933769226,
... |
javascript/reference/global_objects/date/utc/index.md | JavaScript - Global Objects - Date - UTC - Syntax - Return value:
A number representing the timestamp of the given date. Returns `NaN` if the date is invalid. | [
-0.5981884002685547,
-0.058299168944358826,
-1.2892358303070068,
0.2663097679615021,
-0.5365898609161377,
-1.4738553762435913,
0.6017464995384216,
0.9452579021453857,
-1.011877179145813,
0.5376132726669312,
-0.42551517486572266,
1.0549604892730713,
-0.11038781702518463,
0.8766949772834778,... |
javascript/reference/global_objects/date/utc/index.md | JavaScript - Global Objects - Date - UTC - Description:
Years between `0` and `99` are converted to a year in the 20th century `(1900 + year)`. For example, `95` is converted to the year `1995`.
The `UTC()` method differs from the `Date()` constructor in three ways:
- `Date.UTC()` uses universal time instead of the ... | [
-0.635847806930542,
0.5308030843734741,
-1.6659249067306519,
0.777161180973053,
0.08441141247749329,
-2.0601484775543213,
-0.28818362951278687,
0.6221514940261841,
0.24153009057044983,
0.4838232100009918,
-0.27318307757377625,
1.4612133502960205,
-0.35723838210105896,
0.26875320076942444,
... |
javascript/reference/global_objects/date/utc/index.md | JavaScript - Global Objects - Date - UTC - Examples - Using Date.UTC():
The following statement creates a `Date` object with the arguments treated as UTC instead of local:
Example:
const utcDate = new Date(Date.UTC(2018, 11, 1, 0, 0, 0)); | [
-0.49449315667152405,
0.12696707248687744,
-1.6051619052886963,
1.198445439338684,
-0.2822231948375702,
-1.9885733127593994,
-0.286810964345932,
0.26247450709342957,
0.025019368156790733,
0.11053387075662613,
0.1375681608915329,
0.6180053949356079,
0.2006271928548813,
-0.07971473038196564,... |
javascript/reference/global_objects/date/utc/index.md | JavaScript - Global Objects - Date - UTC - Examples - Behavior of Date.UTC() with one argument:
`Date.UTC()` when passed one argument used to have inconsistent behavior, because implementations only kept the behavior consistent with the `Date()` constructor, which does not interpret a single argument as the year numbe... | [
-0.9706124663352966,
0.14465682208538055,
-1.5791610479354858,
0.3428366184234619,
-0.1782524585723877,
-2.3001291751861572,
-0.1629631668329239,
-0.058860816061496735,
-1.0332744121551514,
0.2818211317062378,
-0.31300246715545654,
-0.4884813129901886,
-0.06677602231502533,
-0.190577894449... |
javascript/reference/global_objects/date/symbol.toprimitive/index.md | JavaScript - Global Objects - Date - Symbol.toPrimitive:
The `[Symbol.toPrimitive]()` method of `Date` instances returns a primitive value representing this date. It may either be a string or a number, depending on the hint given.
Example:
// Depending on timezone, your results will vary
const date = new Date("20 De... | [
-0.9476110935211182,
0.13875970244407654,
-0.5246281027793884,
0.012719300575554371,
-0.27030831575393677,
-2.3483495712280273,
0.7079249024391174,
0.5421170592308044,
-1.0635977983474731,
-0.018692048266530037,
-0.7962924242019653,
0.2624726891517639,
0.04374272748827934,
0.14483703672885... |
javascript/reference/global_objects/date/symbol.toprimitive/index.md | JavaScript - Global Objects - Date - Symbol.toPrimitive - Syntax:
Example:
date[Symbol.toPrimitive](hint) | [
-0.8854474425315857,
0.3890240788459778,
-0.036003585904836655,
-0.3205818235874176,
-0.7604953646659851,
-2.9029409885406494,
0.5379672646522522,
1.220190405845642,
-0.7288663983345032,
-0.02368262968957424,
-0.8691380620002747,
-0.2233686000108719,
-0.2535021901130676,
0.2583751380443573... |
javascript/reference/global_objects/date/symbol.toprimitive/index.md | JavaScript - Global Objects - Date - Symbol.toPrimitive - Syntax - Parameters:
- `hint`: A string representing the type of the primitive value to return. The following values are valid:
- `"string"` or `"default"`: The method should return a string.
- `"number"`: The method should return a number. | [
-0.8824734687805176,
-0.17752869427204132,
-0.4914719760417938,
0.07377813756465912,
-0.3868750035762787,
-3.230626106262207,
1.7622779607772827,
0.5595941543579102,
-0.686806857585907,
0.024880914017558098,
-1.7197265625,
0.4021119177341461,
-0.8839297890663147,
0.3606400191783905,
0.07... |
javascript/reference/global_objects/date/symbol.toprimitive/index.md | JavaScript - Global Objects - Date - Symbol.toPrimitive - Syntax - Return value:
If `hint` is `"string"` or `"default"`, this method returns a string by coercing the `this` value to a string (first trying `toString()` then trying `valueOf()`).
If `hint` is `"number"`, this method returns a number by coercing the `thi... | [
-1.1140332221984863,
0.10461205989122391,
0.2941340506076813,
-0.31201422214508057,
-0.194108784198761,
-2.0873587131500244,
0.9059392213821411,
0.31835630536079407,
-1.0270980596542358,
0.5134018063545227,
-1.7584021091461182,
0.38478121161460876,
-0.7669432163238525,
0.21752627193927765,... |
javascript/reference/global_objects/date/symbol.toprimitive/index.md | JavaScript - Global Objects - Date - Symbol.toPrimitive - Syntax - Exceptions:
- `TypeError`: Thrown if the `hint` argument is not one of the three valid values. | [
-0.9280604124069214,
-0.27251505851745605,
-0.15281537175178528,
0.13499757647514343,
-0.3935922384262085,
-2.5108041763305664,
0.2605145275592804,
0.6529239416122437,
-1.1514501571655273,
-0.013123990967869759,
-1.4239623546600342,
-0.3206970691680908,
-0.5512614846229553,
-0.259629547595... |
javascript/reference/global_objects/date/symbol.toprimitive/index.md | JavaScript - Global Objects - Date - Symbol.toPrimitive - Description:
The `[Symbol.toPrimitive]()` method is part of the type coercion protocol. JavaScript always calls the `[Symbol.toPrimitive]()` method in priority to convert an object to a primitive value. You rarely need to invoke the `[Symbol.toPrimitive]()` met... | [
-0.7792195677757263,
0.3534698188304901,
-0.2809419631958008,
-0.09768438339233398,
-0.11846378445625305,
-2.1233789920806885,
1.1711615324020386,
0.6453078389167786,
-0.721753716468811,
0.41756388545036316,
-0.897303581237793,
-0.09438944607973099,
-0.629324734210968,
-0.08333732932806015... |
javascript/reference/global_objects/date/symbol.toprimitive/index.md | JavaScript - Global Objects - Date - Symbol.toPrimitive - Examples - Using Symbol.toPrimitive]():
Example:
const d = new Date(0); // 1970-01-01T00:00:00.000Z
d[Symbol.toPrimitive]("string"); // "Thu Jan 01 1970 00:00:00 GMT+0000 (Coordinated Universal Time)"
d[Symbol.toPrimitive]("number"); // 0
d[Symbol.toPrimitive... | [
-0.37863531708717346,
0.42322057485580444,
-0.8052868247032166,
-0.4104554355144501,
-0.34650719165802,
-1.9890941381454468,
0.051584627479314804,
0.2724885940551758,
-0.04354865103960037,
0.1690855473279953,
-0.7435916066169739,
-0.06478527188301086,
-0.3199097514152527,
0.200909703969955... |
javascript/reference/global_objects/date/getminutes/index.md | JavaScript - Global Objects - Date - getMinutes:
The `getMinutes()` method of `Date` instances returns the minutes for this date according to local time.
Example:
const birthday = new Date("March 13, 08 04:20");
console.log(birthday.getMinutes());
// Expected output: 20 | [
0.007246196735650301,
-0.16583217680454254,
-1.1306277513504028,
0.0607980340719223,
-0.3900814950466156,
-1.6347386837005615,
-0.3537209928035736,
-0.18127408623695374,
-0.2261296808719635,
0.24646113812923431,
-0.5650663375854492,
0.2119956612586975,
-0.2894764542579651,
0.42816546559333... |
javascript/reference/global_objects/date/getminutes/index.md | JavaScript - Global Objects - Date - getMinutes - Syntax:
Example:
getMinutes() | [
-0.4645612835884094,
0.030694076791405678,
-0.7816274762153625,
-0.3699280321598053,
-0.8210856318473816,
-1.942779541015625,
0.10515683144330978,
0.7412542700767517,
-0.45277130603790283,
-0.3621165156364441,
-0.47584986686706543,
0.011810099706053734,
-0.41790246963500977,
0.172933578491... |
javascript/reference/global_objects/date/getminutes/index.md | JavaScript - Global Objects - Date - getMinutes - Syntax - Parameters:
None. | [
-0.4730023145675659,
0.32182788848876953,
-1.0299147367477417,
-0.7640386819839478,
-0.6342014670372009,
-1.2508153915405273,
0.6900458931922913,
0.9383867383003235,
-0.36376282572746277,
-0.5036302804946899,
-0.8255330920219421,
-0.5493752360343933,
-0.1665486991405487,
0.3964596688747406... |
javascript/reference/global_objects/date/getminutes/index.md | JavaScript - Global Objects - Date - getMinutes - Syntax - Return value:
An integer, between 0 and 59, representing the minutes for the given date according to local time. Returns `NaN` if the date is invalid. | [
-0.6151204109191895,
-0.13316933810710907,
-0.15430358052253723,
-0.6347599625587463,
-0.547000527381897,
-1.2166143655776978,
0.1255977749824524,
0.3610081970691681,
-0.7131431102752686,
0.46473416686058044,
-1.1369361877441406,
0.5138482451438904,
-0.35024192929267883,
0.3830496072769165... |
javascript/reference/global_objects/date/getminutes/index.md | JavaScript - Global Objects - Date - getMinutes - Examples - Using getMinutes():
The `minutes` variable has value `15`, based on the value of the `Date` object `xmas95`.
Example:
const xmas95 = new Date("1995-12-25T23:15:30");
const minutes = xmas95.getMinutes();
console.log(minutes); // 15 | [
-0.8817926645278931,
-0.485269159078598,
-1.0206358432769775,
0.4863627552986145,
-0.4220125675201416,
-1.4913482666015625,
-0.26640602946281433,
0.46848905086517334,
0.08056703954935074,
-0.13561087846755981,
-0.2605442404747009,
-0.31883665919303894,
-0.13953229784965515,
-0.256710588932... |
javascript/reference/global_objects/date/getmonth/index.md | JavaScript - Global Objects - Date - getMonth:
The `getMonth()` method of `Date` instances returns the month for this date according to local time, as a zero-based value (where zero indicates the first month of the year).
Example:
const moonLanding = new Date("July 20, 69 00:20:18");
console.log(moonLanding.getMont... | [
-0.043623749166727066,
-0.1459181159734726,
-1.8116377592086792,
-0.4016503095626831,
-0.1540439873933792,
-1.863714337348938,
0.3152045011520386,
0.6045059561729431,
-0.7913317084312439,
-0.16822382807731628,
-0.3585013747215271,
-0.19382521510124207,
0.19776521623134613,
0.50069999694824... |
javascript/reference/global_objects/date/getmonth/index.md | JavaScript - Global Objects - Date - getMonth - Syntax:
Example:
getMonth() | [
0.10157901048660278,
-0.1619170755147934,
-1.5793997049331665,
-0.7320036292076111,
-0.9260404109954834,
-2.3658833503723145,
0.13451099395751953,
0.7270325422286987,
-0.5421188473701477,
-0.7966734766960144,
-0.05087076500058174,
0.012231084518134594,
-0.10578735917806625,
0.3664171993732... |
javascript/reference/global_objects/date/getmonth/index.md | JavaScript - Global Objects - Date - getMonth - Syntax - Parameters:
None. | [
0.13081900775432587,
-0.013213088735938072,
-1.8553475141525269,
-0.9806446433067322,
-0.8252155780792236,
-1.7453796863555908,
0.6220484972000122,
0.9760291576385498,
-0.6477276086807251,
-0.6887853145599365,
-0.532736599445343,
-0.704942524433136,
0.12240642309188843,
0.38605645298957825... |
javascript/reference/global_objects/date/getmonth/index.md | JavaScript - Global Objects - Date - getMonth - Syntax - Return value:
An integer, between 0 and 11, representing the month for the given date according to local time: 0 for January, 1 for February, and so on. Returns `NaN` if the date is invalid. | [
-0.32140636444091797,
-0.26127251982688904,
-0.828190267086029,
-0.9203668832778931,
-0.4855199158191681,
-1.946279525756836,
0.4534900188446045,
0.2647216320037842,
-1.1108689308166504,
0.14851689338684082,
-0.7421124577522278,
0.22629961371421814,
-0.062353748828172684,
0.248593434691429... |
javascript/reference/global_objects/date/getmonth/index.md | JavaScript - Global Objects - Date - getMonth - Description:
The return value of `getMonth()` is zero-based, which is useful for indexing into arrays of months, for example:
Example:
const valentines = new Date("1995-02-14");
const month = valentines.getMonth();
const monthNames = ["January", "February", "March" /* ... | [
-0.5543703436851501,
-0.48141440749168396,
-1.710279107093811,
0.680799126625061,
-0.4140971601009369,
-0.9615314602851868,
0.49040690064430237,
0.11881088465452194,
-0.2796541750431061,
0.43990182876586914,
-0.47412434220314026,
0.1895405501127243,
0.6468954682350159,
0.6284525990486145,
... |
javascript/reference/global_objects/date/getmonth/index.md | JavaScript - Global Objects - Date - getMonth - Examples - Using getMonth():
The `month` variable has value `11`, based on the value of the `Date` object `xmas95`.
Example:
const xmas95 = new Date("1995-12-25T23:15:30");
const month = xmas95.getMonth();
console.log(month); // 11 | [
-0.5082072019577026,
-0.5377489924430847,
-1.6322264671325684,
-0.1544688642024994,
-0.6460634469985962,
-2.0849175453186035,
-0.14357306063175201,
0.43968039751052856,
-0.09952536225318909,
-0.444720596075058,
0.041090477257966995,
-0.506891667842865,
0.015413002111017704,
0.2129225283861... |
javascript/reference/global_objects/date/setmonth/index.md | JavaScript - Global Objects - Date - setMonth:
The `setMonth()` method of `Date` instances changes the month and/or day of the month for this date according to local time.
Example:
const event = new Date("August 19, 1975 23:15:30");
event.setMonth(3);
console.log(event.getMonth());
// Expected output: 3
console.l... | [
0.1635303646326065,
-0.648459792137146,
-1.4779000282287598,
0.34208130836486816,
-0.48527857661247253,
-2.087491989135742,
-0.6450757384300232,
0.301761269569397,
-0.1368429958820343,
-0.027778537943959236,
0.03266318887472153,
0.21513241529464722,
0.0774005800485611,
0.29328635334968567,... |
javascript/reference/global_objects/date/setmonth/index.md | JavaScript - Global Objects - Date - setMonth - Syntax:
Example:
setMonth(monthValue)
setMonth(monthValue, dateValue) | [
0.0618816539645195,
0.0631428062915802,
-1.3983813524246216,
-0.11823368817567825,
-0.8508651852607727,
-1.7972919940948486,
0.24638722836971283,
0.8002892136573792,
-0.21145838499069214,
-0.8878136277198792,
0.24081304669380188,
0.2127893716096878,
0.7928213477134705,
0.16540466248989105,... |
javascript/reference/global_objects/date/setmonth/index.md | JavaScript - Global Objects - Date - setMonth - Syntax - Parameters:
- `monthValue`: An integer representing the month: 0 for January, 1 for February, and so on.
- `dateValue` (optional): An integer from 1 to 31 representing the day of the month. | [
-0.37057405710220337,
-0.18333840370178223,
-1.10453200340271,
-0.2739357054233551,
-0.07669088989496231,
-2.233253240585327,
0.3137822449207306,
0.5481905937194824,
-0.17445853352546692,
-0.2764061689376831,
-0.34955278038978577,
-0.10390176624059677,
0.42477354407310486,
0.05461500212550... |
javascript/reference/global_objects/date/setmonth/index.md | JavaScript - Global Objects - Date - setMonth - Syntax - Return value:
Changes the `Date` object in place, and returns its new timestamp. If a parameter is `NaN` (or other values that get coerced to `NaN`, such as `undefined`), the date is set to Invalid Date and `NaN` is returned. | [
-0.6419025659561157,
-0.4222113788127899,
-0.8753479719161987,
0.04891083389520645,
-0.53379887342453,
-1.774081826210022,
0.35049372911453247,
0.9003742337226868,
-1.1529557704925537,
0.3550065755844116,
-0.5578994750976562,
0.3376685380935669,
0.19380499422550201,
0.6597140431404114,
0... |
javascript/reference/global_objects/date/setmonth/index.md | JavaScript - Global Objects - Date - setMonth - Description:
If you do not specify the `dateValue` parameter, the same value as what is returned by `getDate()` is used.
If a parameter you specify is outside of the expected range, other parameters and the date information in the `Date` object are updated accordingly. ... | [
-0.47363314032554626,
-0.19070659577846527,
-1.5126525163650513,
0.5035814642906189,
-0.40268221497535706,
-2.2318127155303955,
-0.15015827119350433,
-0.15618844330310822,
-0.7980575561523438,
-0.046598415821790695,
-0.7362489700317383,
0.2494330257177353,
0.2833220362663269,
0.39733919501... |
javascript/reference/global_objects/date/setmonth/index.md | JavaScript - Global Objects - Date - setMonth - Examples - Using setMonth():
Example:
const theBigDay = new Date();
theBigDay.setMonth(6);
// Watch out for end of month transitions
const endOfMonth = new Date(2016, 7, 31);
endOfMonth.setMonth(1);
console.log(endOfMonth); // Wed Mar 02 2016 00:00:00 | [
-0.9328736066818237,
0.008491882123053074,
-1.1709692478179932,
0.003938427194952965,
-0.6350506544113159,
-1.7293423414230347,
-0.4766538441181183,
-0.23721720278263092,
-0.07225612550973892,
-0.4312613606452942,
-0.06911569833755493,
0.20850428938865662,
0.46511754393577576,
0.5701197981... |
javascript/reference/global_objects/date/getseconds/index.md | JavaScript - Global Objects - Date - getSeconds:
The `getSeconds()` method of `Date` instances returns the seconds for this date according to local time.
Example:
const moonLanding = new Date("July 20, 69 00:20:18");
console.log(moonLanding.getSeconds());
// Expected output: 18 | [
-0.6054757833480835,
-0.14649344980716705,
-1.5050482749938965,
-0.16137424111366272,
-0.2499241679906845,
-1.5127266645431519,
-0.008658109232783318,
0.5876222848892212,
-0.6775127649307251,
-0.35106033086776733,
-0.3931501805782318,
0.313181072473526,
0.19261935353279114,
0.3203905522823... |
javascript/reference/global_objects/date/getseconds/index.md | JavaScript - Global Objects - Date - getSeconds - Syntax:
Example:
getSeconds() | [
-0.7402676939964294,
-0.039285074919462204,
-1.0088783502578735,
-0.09138637781143188,
-0.8016281723976135,
-1.695650577545166,
0.11950909346342087,
1.1091023683547974,
-0.3614974915981293,
-0.5464916229248047,
-0.15938176214694977,
0.21611544489860535,
-0.037016723304986954,
0.15905389189... |
javascript/reference/global_objects/date/getseconds/index.md | JavaScript - Global Objects - Date - getSeconds - Syntax - Parameters:
None. | [
-0.8367816805839539,
0.20098809897899628,
-1.0504869222640991,
-0.44416138529777527,
-0.5926231741905212,
-1.0567001104354858,
0.726440966129303,
1.2185025215148926,
-0.33178725838661194,
-0.7609526515007019,
-0.4503087103366852,
-0.3039095103740692,
0.10923106223344803,
0.2251907736063003... |
javascript/reference/global_objects/date/getseconds/index.md | JavaScript - Global Objects - Date - getSeconds - Syntax - Return value:
An integer, between 0 and 59, representing the seconds for the given date according to local time. Returns `NaN` if the date is invalid. | [
-0.9617544412612915,
-0.3607062101364136,
-0.3717128038406372,
-0.5198283791542053,
-0.4259481728076935,
-1.0475268363952637,
0.07784384489059448,
0.5769683718681335,
-0.733436644077301,
0.22779691219329834,
-0.7480568289756775,
0.5938743352890015,
0.11407312750816345,
-0.01637235470116138... |
javascript/reference/global_objects/date/getseconds/index.md | JavaScript - Global Objects - Date - getSeconds - Examples - Using getSeconds():
The `seconds` variable has value `30`, based on the value of the `Date` object `xmas95`.
Example:
const xmas95 = new Date("1995-12-25T23:15:30");
const seconds = xmas95.getSeconds();
console.log(seconds); // 30 | [
-1.5987902879714966,
-0.6138870120048523,
-1.105021357536316,
0.3002304434776306,
-0.22673341631889343,
-1.512217402458191,
-0.34630247950553894,
0.8437429070472717,
0.20537126064300537,
-0.3782808780670166,
0.21872372925281525,
0.08376256376504898,
0.38554590940475464,
-0.6570709347724915... |
javascript/reference/global_objects/date/setseconds/index.md | JavaScript - Global Objects - Date - setSeconds:
The `setSeconds()` method of `Date` instances changes the seconds and/or milliseconds for this date according to local time.
Example:
const event = new Date("August 19, 1975 23:15:30");
event.setSeconds(42);
console.log(event.getSeconds());
// Expected output: 42
c... | [
-0.5569250583648682,
-0.6092656850814819,
-1.1402032375335693,
0.8123375773429871,
-0.29911282658576965,
-1.5630885362625122,
-0.6710216403007507,
0.46352946758270264,
0.028101367875933647,
-0.010291220620274544,
-0.32536089420318604,
0.2796300947666168,
0.2328205704689026,
-0.132145673036... |
javascript/reference/global_objects/date/setseconds/index.md | JavaScript - Global Objects - Date - setSeconds - Syntax:
Example:
setSeconds(secondsValue)
setSeconds(secondsValue, msValue) | [
-0.9813310503959656,
0.26967400312423706,
-0.6981853246688843,
0.6631430387496948,
-0.5095320343971252,
-1.3648934364318848,
-0.02096771076321602,
0.7562093138694763,
0.2594141960144043,
-0.6308642625808716,
0.017073100432753563,
0.2616801857948303,
0.8773391246795654,
-0.2513299882411957,... |
javascript/reference/global_objects/date/setseconds/index.md | JavaScript - Global Objects - Date - setSeconds - Syntax - Parameters:
- `secondsValue`: An integer between 0 and 59 representing the seconds.
- `msValue` (optional): An integer between 0 and 999 representing the milliseconds. | [
-1.069230556488037,
-0.3017820715904236,
-0.8292136788368225,
-0.06600222736597061,
-0.17180581390857697,
-1.1002354621887207,
-0.35823294520378113,
0.3693600594997406,
0.5941737294197083,
-0.1682218611240387,
-0.511421799659729,
0.20030201971530914,
0.8599754571914673,
-0.2244887799024582... |
javascript/reference/global_objects/date/setseconds/index.md | JavaScript - Global Objects - Date - setSeconds - Syntax - Return value:
Changes the `Date` object in place, and returns its new timestamp. If a parameter is `NaN` (or other values that get coerced to `NaN`, such as `undefined`), the date is set to Invalid Date and `NaN` is returned. | [
-1.0885071754455566,
-0.30868422985076904,
-0.6860743165016174,
0.4061018228530884,
-0.3662877082824707,
-1.5660450458526611,
0.36329132318496704,
0.9582070708274841,
-0.9717385172843933,
0.3462904393672943,
-0.5747933387756348,
0.45483535528182983,
0.25132274627685547,
0.24213695526123047... |
javascript/reference/global_objects/date/setseconds/index.md | JavaScript - Global Objects - Date - setSeconds - Description:
If you do not specify the `msValue` parameter, the value returned from the `getMilliseconds()` method is used.
If a parameter you specify is outside of the expected range, `setSeconds()` attempts to update the date information in the `Date` object accordi... | [
-0.3181268572807312,
0.19302748143672943,
-0.8127885460853577,
1.2457904815673828,
0.25753116607666016,
-1.0380609035491943,
0.38073381781578064,
0.28942716121673584,
-0.5328309535980225,
0.7236348390579224,
-0.2601718604564667,
-0.14587923884391785,
-0.07504428923130035,
0.277969658374786... |
javascript/reference/global_objects/date/setseconds/index.md | JavaScript - Global Objects - Date - setSeconds - Examples - Using setSeconds():
Example:
const theBigDay = new Date();
theBigDay.setSeconds(30); | [
-1.1127103567123413,
0.015495063737034798,
-0.8578315377235413,
0.7880818843841553,
-0.4136910140514374,
-1.2182520627975464,
-0.08514130860567093,
0.21636222302913666,
-0.09721889346837997,
-0.6010346412658691,
-0.5317534804344177,
0.3162240982055664,
0.43794599175453186,
-0.2209159582853... |
javascript/reference/global_objects/date/getutcminutes/index.md | JavaScript - Global Objects - Date - getUTCMinutes:
The `getUTCMinutes()` method of `Date` instances returns the minutes for this date according to universal time.
Example:
const date1 = new Date("1 January 2000 03:15:30 GMT+07:00");
const date2 = new Date("1 January 2000 03:15:30 GMT+03:30");
console.log(date1.get... | [
-0.5516010522842407,
0.31659895181655884,
-1.6938989162445068,
0.3977394104003906,
0.0327848419547081,
-1.270870327949524,
-0.5355725288391113,
0.2548949122428894,
-0.06743130832910538,
0.298755019903183,
-0.1693262755870819,
1.0508184432983398,
0.23421072959899902,
0.5607603788375854,
-... |
javascript/reference/global_objects/date/getutcminutes/index.md | JavaScript - Global Objects - Date - getUTCMinutes - Syntax:
Example:
getUTCMinutes() | [
-0.41329389810562134,
0.31040236353874207,
-1.659780502319336,
0.10725892335176468,
-0.8381043672561646,
-2.037548542022705,
0.044660430401563644,
0.6217911839485168,
-0.07293331623077393,
-0.19926805794239044,
-0.13723480701446533,
0.2713607847690582,
0.02086789347231388,
0.36720013618469... |
javascript/reference/global_objects/date/getutcminutes/index.md | JavaScript - Global Objects - Date - getUTCMinutes - Syntax - Parameters:
None. | [
-0.38754531741142273,
0.4289279878139496,
-1.6575143337249756,
-0.27632591128349304,
-0.632713258266449,
-1.302878499031067,
0.6074966192245483,
0.9606981873512268,
0.03490947186946869,
-0.30719566345214844,
-0.39357492327690125,
-0.17996342480182648,
0.11049436777830124,
0.409412920475006... |
javascript/reference/global_objects/date/getutcminutes/index.md | JavaScript - Global Objects - Date - getUTCMinutes - Syntax - Return value:
An integer, between 0 and 59, representing the minutes for the given date according to universal time. Returns `NaN` if the date is invalid. | [
-0.5657556653022766,
0.16718336939811707,
-0.9446308612823486,
-0.26095491647720337,
-0.5200027823448181,
-1.1808308362960815,
-0.04508597403764725,
0.3588918447494507,
-0.40952634811401367,
0.4617350101470947,
-0.5869196057319641,
0.7278326153755188,
0.19827088713645935,
0.520287752151489... |
javascript/reference/global_objects/date/getutcminutes/index.md | JavaScript - Global Objects - Date - getUTCMinutes - Examples - Using getUTCMinutes():
The following example assigns the minutes portion of the current time to the variable `minutes`.
Example:
const today = new Date();
const minutes = today.getUTCMinutes(); | [
-0.6834023594856262,
0.49351656436920166,
-1.520998239517212,
0.7139185070991516,
-0.5318366885185242,
-1.27541983127594,
0.1147739589214325,
0.02907250076532364,
0.5616254806518555,
-0.05123600736260414,
-0.4042770564556122,
0.19847126305103302,
-0.10298487544059753,
0.5300848484039307,
... |
javascript/reference/global_objects/date/getutcmonth/index.md | JavaScript - Global Objects - Date - getUTCMonth:
The `getUTCMonth()` method of `Date` instances returns the month for this date according to universal time, as a zero-based value (where zero indicates the first month of the year).
Example:
const date1 = new Date("December 31, 1975, 23:15:30 GMT+11:00");
const date2... | [
-0.05583430454134941,
0.02776150405406952,
-2.175189256668091,
0.3473920524120331,
-0.04958811402320862,
-1.724427342414856,
-0.0590224415063858,
0.5065903067588806,
-0.07297756522893906,
0.125790536403656,
0.05173111334443092,
0.27934691309928894,
0.3871861398220062,
0.6004483699798584,
... |
javascript/reference/global_objects/date/getutcmonth/index.md | JavaScript - Global Objects - Date - getUTCMonth - Syntax:
Example:
getUTCMonth() | [
0.06382844597101212,
0.24598583579063416,
-2.3386170864105225,
0.013488207943737507,
-0.9506608247756958,
-2.341723918914795,
-0.026248140260577202,
0.433272123336792,
0.006575609091669321,
-0.34560102224349976,
0.4790845811367035,
0.33881837129592896,
0.19152794778347015,
0.52035981416702... |
javascript/reference/global_objects/date/getutcmonth/index.md | JavaScript - Global Objects - Date - getUTCMonth - Syntax - Parameters:
None. | [
-0.0019750127103179693,
0.28367412090301514,
-2.276379108428955,
-0.2498568594455719,
-0.7240951061248779,
-1.526935338973999,
0.4071287512779236,
0.835962176322937,
-0.089201420545578,
-0.3719501197338104,
0.09630290418863297,
-0.23370443284511566,
0.23575617372989655,
0.439805269241333,
... |
javascript/reference/global_objects/date/getutcmonth/index.md | JavaScript - Global Objects - Date - getUTCMonth - Syntax - Return value:
An integer, between 0 and 11, representing the month for the given date according to universal time: 0 for January, 1 for February, and so on. Returns `NaN` if the date is invalid. | [
-0.33177509903907776,
0.1380157619714737,
-1.4409335851669312,
-0.24726040661334991,
-0.4567852020263672,
-1.6774786710739136,
0.23032815754413605,
0.2623196542263031,
-0.7453402280807495,
0.3298763632774353,
-0.09588707238435745,
0.4691588878631592,
0.278152734041214,
0.43217146396636963,... |
javascript/reference/global_objects/date/getutcmonth/index.md | JavaScript - Global Objects - Date - getUTCMonth - Examples - Using getUTCMonth():
The following example assigns the month portion of the current date to the variable `month`.
Example:
const today = new Date();
const month = today.getUTCMonth(); | [
-0.36737215518951416,
0.30988579988479614,
-2.1074302196502686,
0.3614203631877899,
-0.6654325127601624,
-1.8195643424987793,
0.13523827493190765,
-0.18952126801013947,
0.3541586101055145,
-0.23771904408931732,
0.03968603163957596,
0.30917930603027344,
0.15132160484790802,
0.73824238777160... |
javascript/reference/global_objects/date/tostring/index.md | JavaScript - Global Objects - Date - toString:
The `toString()` method of `Date` instances returns a string representing this date interpreted in the local timezone.
Example:
const event = new Date("August 19, 1975 23:15:30");
console.log(event.toString());
// Expected output: "Tue Aug 19 1975 23:15:30 GMT+0200 (CE... | [
-0.45091143250465393,
-0.41378605365753174,
-0.8394094109535217,
0.4016944169998169,
0.06876078248023987,
-2.506012201309204,
-0.48381105065345764,
-0.1480223834514618,
-0.42502734065055847,
0.17358548939228058,
-0.1831391155719757,
0.3985043168067932,
0.20085783302783966,
0.24922713637351... |
javascript/reference/global_objects/date/tostring/index.md | JavaScript - Global Objects - Date - toString - Syntax:
Example:
toString() | [
-1.1039085388183594,
0.3997221291065216,
-0.44654223322868347,
-0.06190972030162811,
-0.46931034326553345,
-2.3882555961608887,
0.12032798677682877,
0.6132983565330505,
-0.570356547832489,
-0.7541655898094177,
-0.13923536241054535,
0.380703330039978,
0.03890994191169739,
-0.251485198736190... |
javascript/reference/global_objects/date/tostring/index.md | JavaScript - Global Objects - Date - toString - Syntax - Parameters:
None. | [
-0.8361219763755798,
0.28236207365989685,
-0.7807813882827759,
-0.5244231820106506,
-0.5001578330993652,
-1.9076974391937256,
0.657473087310791,
0.7707968354225159,
-0.6152753829956055,
-0.7994236946105957,
-0.7023729681968689,
-0.44569599628448486,
0.20415078103542328,
0.00598957529291510... |
javascript/reference/global_objects/date/tostring/index.md | JavaScript - Global Objects - Date - toString - Syntax - Return value:
A string representing the given date (see description for the format). Returns `"Invalid Date"` if the date is invalid. | [
-0.9458341598510742,
-0.05929318070411682,
-0.3740190267562866,
-0.10376964509487152,
-0.09528505802154541,
-2.3520267009735107,
0.5808583498001099,
0.8741452693939209,
-0.8975719213485718,
0.1939995288848877,
-0.47752267122268677,
0.6367618441581726,
0.25758278369903564,
0.496276199817657... |
javascript/reference/global_objects/date/tostring/index.md | JavaScript - Global Objects - Date - toString - Description:
The `toString()` method is part of the type coercion protocol. Because `Date` has a `[Symbol.toPrimitive]()` method, that method always takes priority over `toString()` when a `Date` object is implicitly coerced to a string. However, `Date.prototype[Symbol.t... | [
-0.6482949256896973,
0.2744866609573364,
-0.11998069286346436,
0.6644556522369385,
0.8125452399253845,
-0.8584782481193542,
0.1621144711971283,
0.48030444979667664,
-0.4180137813091278,
0.09131190925836563,
-0.6668950319290161,
-0.4170694947242737,
0.3243557810783386,
0.29894334077835083,
... |
javascript/reference/global_objects/date/tostring/index.md | JavaScript - Global Objects - Date - toString - Examples - Using toString():
Example:
const d = new Date(0);
console.log(d.toString()); // "Thu Jan 01 1970 00:00:00 GMT+0000 (Coordinated Universal Time)" | [
-0.6345219612121582,
0.45713716745376587,
-1.0934535264968872,
0.14182323217391968,
-0.16800199449062347,
-2.0746121406555176,
-0.6268033981323242,
-0.32793113589286804,
-0.19277039170265198,
-0.4128263592720032,
0.00936077069491148,
0.08882986009120941,
0.20508211851119995,
0.038379665464... |
javascript/reference/global_objects/date/getyear/index.md | JavaScript - Global Objects - Date - getYear:
Deprecated: This feature is no longer recommended.
The `getYear()` method of `Date` instances returns the year for this date according to local time. Because `getYear()` does not return full years ("year 2000 problem"), it is deprecated and has been replaced by the `getFu... | [
-0.48260068893432617,
0.3695693016052246,
-1.1554192304611206,
-0.18429619073867798,
-0.340190589427948,
-2.4718518257141113,
0.6163608431816101,
0.211046040058136,
-0.8772056698799133,
0.3080788254737854,
-0.7121624946594238,
0.4676198363304138,
-0.24232864379882812,
0.8477786779403687,
... |
javascript/reference/global_objects/date/getyear/index.md | JavaScript - Global Objects - Date - getYear - Syntax:
Example:
getYear() | [
-0.32690560817718506,
0.5102052092552185,
-1.1280721426010132,
-0.4370698928833008,
-0.6894413232803345,
-2.4728569984436035,
-0.290921151638031,
0.9357628226280212,
-0.4272187352180481,
-0.2936933636665344,
-0.1921743005514145,
0.3942820131778717,
-0.5700209140777588,
0.37900885939598083,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.