Get the day of the month of the given date.
Get the day of the month of the given date.
// CommonJS
var getDate = require('date-fns/getDate')
// ES 2015 import getDate from 'date-fns/getDate'
// ESM
import { getDate } from 'date-fns'
getDate(date)
| Name | Description |
|---|---|
date |
the given date |
| Description |
|---|
|
the day of month |
| Type | Description |
|---|---|
TypeError |
1 argument required |
// Which day of the month is 29 February 2012? const result = getDate(new Date(2012, 1, 29)) //=> 29
© 2021 Sasha Koss and Lesha Koss
Licensed under the MIT License.
https://date-fns.org/v2.29.2/docs/getDate