---
title: date
date: 2024-08-13T18:55:12Z
tags: []
---


#### get object

```javascript
const <value> = new Date()
```

#### data object function

|function|date|explain|
| ----------| ---------| -----------------------------|
|​`getFullYear()`​|year|get a four digit year|
|​`getMonth()`​|month|value：0~11|
|​`getDate()`|day|day of the month|
|​`getDay()`​|week|day of the week，value：0~6|
|​`getHours()`​|hours|value：0~23|
|​`getMinutes()`​|minutes|value：0~59|
|​`getSeconds()`​|seconds|value：0~59|

#### time stamp

##### get

1. ​`getTime()`​
2. ​`+new Date()`​
3. ​`Date now()`​
