# Ruby code for mday() method# Include Timerequire'time'# Declaring time
a =Time.new(2000,12,23)# Prints the day of the month for the time
puts a.mday()
Ruby
输出:
23
Ruby
例2 :
# Ruby code for mday() method# Include Timerequire'time'# Declaring time
a =Time.now()# Prints the day of the month for the time
puts a.mday()