APIdock / Ruby
/
Browse About
method

day

v2_5_5 - Show latest stable - Class: Date
day()
public

Returns the day of the month (1-31).

Date.new(2001,2,3).mday           #=> 3
static VALUE
d_lite_mday(VALUE self)
{
    get_d1(self);
    return INT2FIX(m_mday(dat));
}

Related methods

  • Instance methods
  • +
  • -
  • <<
  • <=>
  • ===
  • >>
  • ajd
  • amjd
  • as_json
  • asctime
  • ctime
  • cwday
  • cweek
  • cwyear
  • day
  • day_fraction
  • downto
  • england
  • eql?
  • friday?
  • gregorian
  • gregorian?
  • hash
  • httpdate
  • initialize_copy
  • inspect
  • iso8601
  • italy
  • jd
  • jisx0301
  • julian
  • julian?
  • ld
  • leap?
  • marshal_dump
  • marshal_load
  • mday
  • mjd
  • mon
  • monday?
  • month
  • new_start
  • next
  • next_day
  • next_month
  • next_year
  • prev_day
  • prev_month
  • prev_year
  • rfc2822
  • rfc3339
  • rfc822
  • saturday?
  • start
  • step
  • strftime
  • succ
  • sunday?
  • thursday?
  • to_date
  • to_datetime
  • to_json
  • to_s
  • to_time
  • tuesday?
  • upto
  • wday
  • wednesday?
  • xmlschema
  • yday
  • year
  • Class methods
  • _httpdate
  • _iso8601
  • _jisx0301
  • _load
  • _parse
  • _rfc2822
  • _rfc3339
  • _rfc822
  • _strptime
  • _xmlschema
  • civil
  • commercial
  • gregorian_leap?
  • httpdate
  • iso8601
  • jd
  • jisx0301
  • json_create
  • julian_leap?
  • leap?
  • new
  • ordinal
  • parse
  • rfc2822
  • rfc3339
  • rfc822
  • strptime
  • today
  • valid_civil?
  • valid_commercial?
  • valid_date?
  • valid_jd?
  • valid_ordinal?
  • xmlschema
  • Private methods
  • privatehour
  • privatemin
  • privateminute
  • privatenew_offset
  • privateoffset
  • privatesec
  • privatesec_fraction
  • privatesecond
  • privatesecond_fraction
  • privatezone
APIdock API Documentation Browser

© 2026 APIdock