Skip to content

Tag Archives: Ruby Time-class

Time#to_time() : to_time() is a Time class method which returns the time object itself. Syntax: Time.to_time() Parameter: Time values Return: the time object itself. Example… Read More
Time#tv_nsec() is a Time class method which returns the number of nanoseconds for time. Syntax: Time.tv_nsec() Parameter: Time values Return: the number of nanoseconds for… Read More
Time#monday?() is a Time class method which checks whether the time represents Monday. Syntax: Time.monday?() Parameter: Time values Return: true – if the time represents… Read More
Time#round() is a Time class method which returns a new time object by rounding sub seconds to a given precision in decimal digits. Syntax: Time.round()… Read More
Time#tuesday?() is a Time class method which checks whether the time represents Tuesday. Syntax: Time.tuesday?() Parameter: Time values Return: true – if the time represents… Read More
Time#wednesday?() is a Time class method which checks whether the time represents wednesday. Syntax: Time.wednesday?() Parameter: Time values Return: true – if the time represents… Read More
Time#hash() : hash() is a Time class method which returns the hash code for this Time object. Syntax: Time.hash() Parameter: Time values Return: the hash… Read More
Time#hour() is a Time class method which returns the hour of the day form 0 to 23 for the time. Syntax: Time.hour() Parameter: Time values… Read More
Time#inspect() is a Time class method which returns the string representation of the time.  Syntax: Time.inspect()Parameter: Time valuesReturn: string representation of the time. Example #1… Read More
Time#isdst(): isdst() is a Time class method which checks whether the time occurs during Daylight Saving Time in its time zone. Syntax: Time.isdst()Parameter: Time valuesReturn:… Read More
Time#utc_offset() is a Time class method which returns the offset in seconds between the timezone of time and UTC. Syntax: Time.utc_offset() Parameter: Time values Return:… Read More
Time#gmt?() is a Time class method which checks whether the time represents a time in UTC (GMT). Syntax: Time.gmt?() Parameter: Time values Return: true –… Read More
Time#gmtime() is a Time class method which modifies the receiver and converts time to UTC (GMT). Syntax: Time.gmtime() Parameter: Time values Return: converts time to… Read More
Time#getutc() is a Time class method which returns a new Time object that represents time in UTC (GMT) Syntax: Time.getutc() Parameter: Time values Return: new… Read More
Time#getlocal() is a Time class method which returns a new Time object that represents time in local time. Syntax: Time.getlocal() Parameter: Time values Return: new… Read More

Start Your Coding Journey Now!