JavaScript Code


JavaScript – Get Day of Month from UTC Date


Date – getUTCDate()

date.getUTCDate()

getUTCDate() returns the day of month, an integer from 1 to 31, of this date object, according to universal time

Example

1. get the day of month for the current date according to universal time

let date = new Date();
console.log(date);
console.log(date.getUTCDate());


Copyright @2022