ADVERTISEMENT
ADVERTISEMENT

Ruby Date and Time Programs

This section contains Ruby Date and Time, practice these Ruby programs to learn the concept of Ruby Date and Time, these programs contain the solved code, outputs, and the detailed explanation of the statements, functions used in the Ruby Date and Time.

List of Ruby Date and Time Programs

  1. Ruby program to get current date-time using inspect() method
  2. Ruby program to get the individual components of the current date-time
  3. Ruby program to get the current weekday
  4. Ruby program to get the current time zone
  5. Ruby program to get the current day of the year out of 365
  6. Ruby program to get the current weekday in 3 characters using strftime() method
  7. Ruby program to get the current weekday name using strftime() method
  8. Ruby program to get the current month name in 3 characters using strftime() method
  9. Ruby program to get the current month name using strftime() method
  10. Ruby program to get the current date-time using strftime() method
  11. Ruby program to get the current day number of the month using strftime() method
  12. Ruby program to get the current hour of the day in the 24-hour format using strftime() method
  13. Ruby program to get the current hour of the day in 12-hour format using strftime() method
  14. Ruby program to get the current day of the year using the strftime() method
  15. Ruby program to get the current month of the year using the strftime() method
  16. Ruby program to get the current minute of the hour using strftime() method
  17. Ruby program to get the current second of minute using strftime() method
  18. Ruby program to get the current week-number of the year using strftime() method
  19. Ruby program to get the Meridian indicator using strftime() method
  20. Ruby program to get the current week-number of the year, starting with the first Monday as the first day of the first week
  21. Ruby program to get the current day of the week (Sunday is 0) using strftime() method
  22. Ruby program to get the current date only (no time) using strftime() method
  23. Ruby program to get the current time only (no date) using strftime() method
  24. Ruby program to get the current year in two digits representation using strftime() method
  25. Ruby program to get the current year in four digits representation using strftime() method
  26. Ruby program to demonstrate the time arithmetic

ADVERTISEMENT
ADVERTISEMENT


Comments and Discussions!



ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT

Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© https://www.includehelp.com some rights reserved.