@@ -20,7 +20,7 @@ limitations under the License.
20
20
21
21
# isSameDateObject
22
22
23
- > Test if two arguments are both Date objects and represent the same date object
23
+ > Test if two arguments are both Date objects corresponding to the same date and time.
24
24
25
25
<section class =" usage " >
26
26
@@ -32,15 +32,15 @@ var isSameDateObject = require( '@stdlib/assert/is-same-date-object' );
32
32
33
33
#### isSameDateObject( d1 , d2 )
34
34
35
- Tests if two arguments are both valid date objects and both resolve to the same timestamp .
35
+ Tests if two arguments are both Date objects corresponding to the same date and time .
36
36
37
37
``` javascript
38
- var d1 = new Date (2024 , 11 , 31 , 23 , 59 , 59 , 999 );
39
- var d2 = new Date (2024 , 11 , 31 , 23 , 59 , 59 , 999 );
38
+ var d1 = new Date ( 2024 , 11 , 31 , 23 , 59 , 59 , 999 );
39
+ var d2 = new Date ( 2024 , 11 , 31 , 23 , 59 , 59 , 999 );
40
40
var bool = isSameDateObject ( d1, d2 );
41
41
// returns true
42
42
43
- bool = isSameDateObject ( d1, new Date (2023 , 11 , 31 , 23 , 59 , 59 , 78 ));
43
+ bool = isSameDateObject ( d1, new Date ( 2023 , 11 , 31 , 23 , 59 , 59 , 78 ));
44
44
// returns false
45
45
46
46
```
@@ -59,31 +59,31 @@ bool = isSameDateObject( d1, new Date(2023, 11, 31, 23, 59, 59, 78));
59
59
``` javascript
60
60
var isSameDateObject = require ( ' @stdlib/assert/is-same-date-object' );
61
61
62
- var d1 = new Date (2024 , 11 , 31 , 23 , 59 , 59 , 999 );
63
- var d2 = new Date (2024 , 11 , 31 , 23 , 59 , 59 , 999 );
62
+ var d1 = new Date ( 2024 , 11 , 31 , 23 , 59 , 59 , 999 );
63
+ var d2 = new Date ( 2024 , 11 , 31 , 23 , 59 , 59 , 999 );
64
64
65
65
var bool = isSameDateObject ( d1, d2 );
66
66
// returns true
67
67
68
- d1 = new Date (2024 , 11 , 31 , 23 , 59 , 59 , 999 );
69
- d2 = new Date (2024 , 11 , 31 , 23 , 59 , 59 , 78 );
68
+ d1 = new Date ( 2024 , 11 , 31 , 23 , 59 , 59 , 999 );
69
+ d2 = new Date ( 2024 , 11 , 31 , 23 , 59 , 59 , 78 );
70
70
71
71
bool = isSameDateObject ( d1, d2 );
72
72
// returns false
73
73
74
74
d1 = new Date (); // Current date and time
75
- d2 = new Date (' 2024-12-31T23:59:59.999' ); // Date and time specified in ISO 8601 format
75
+ d2 = new Date ( ' 2024-12-31T23:59:59.999' ); // Date and time specified in ISO 8601 format
76
76
77
- bool = isSameDateObject (d1, d2);
77
+ bool = isSameDateObject ( d1, d2 );
78
78
// returns false
79
79
80
- var d3 = new Date (2024 , 11 , 31 ); // Date specified using year, month, and day
81
- var d4 = new Date (' December 31, 2024 23:59:59:999' ); // Date and time specified in a readable format
80
+ var d3 = new Date ( 2024 , 11 , 31 ); // Date specified using year, month, and day
81
+ var d4 = new Date ( ' December 31, 2024 23:59:59:999' ); // Date and time specified in a readable format
82
82
83
- bool = isSameDateObject (d1, d3);
83
+ bool = isSameDateObject ( d1, d3 );
84
84
// returns false
85
85
86
- bool = isSameDateObject (d2, d4);
86
+ bool = isSameDateObject ( d2, d4 );
87
87
// returns true
88
88
```
89
89
0 commit comments