Ruby | Date day() function
Date#day() is a Date class method which returns the day of the month from 1 to 31. Syntax: Date.day() Parameter: Date values Return: the day of the month from 1 to 31. Example #1 : Ruby 1=1 # Ruby code for Date.day() method # loading date require 'date' # declaring Date a = Date.new(2019, 1, 1) # de