Home

dayOfMonth

DayOfMonth refers to the day component of a calendar date, indicating the day within the current month. For example, the date 2025-04-23 has a dayOfMonth of 23. The term is used across many date and time representations to separate the month and year from the day.

The typical range for dayOfMonth is 1 through 31. Each month has a different maximum day, with

In software development, dayOfMonth is a standard field in date/time types. It is often exposed as a

Operations involving dayOfMonth interact with month length. Adding or subtracting days can roll the date into

See also: day of week, day of year, calendar arithmetic, ISO date.

February
having
28
days
in
common
years
and
29
days
in
leap
years.
Any
day
value
outside
the
valid
range
for
a
given
month
is
considered
invalid
in
strict
date
representations
and
may
trigger
validation
errors
or
automatic
adjustment
by
date
libraries.
property
named
day,
dayOfMonth,
or
dayOfMonth
depending
on
the
language
or
library.
Examples
include
Java's
LocalDate.getDayOfMonth(),
Python's
datetime.day,
and
JavaScript's
Date.getDate().
SQL
databases
provide
similar
access
through
functions
like
extracting
the
day
from
a
date.
adjacent
months
or
years,
and
changing
the
month
may
require
clamping
or
adjusting
the
day
if
the
current
day
exceeds
the
target
month's
maximum.
Some
date
libraries
offer
safe
constructors
or
normalization
routines
to
prevent
invalid
dates.