Rust Date and Time Programs

Practice these Rust date and time programs to learn the concept of date and time in Rust language, these programs contain the solved code, outputs, and a detailed explanation of the statements, functions used in the Rust date and time programs.

List of Rust Date and Time Programs

  1. Rust program to get the UTC current date and time
  2. Rust program to get the current date and time based on local time zone
  3. Rust program to get the current timestamp
  4. Rust program to convert the timestamp into readable date time
  5. Rust program to print date-time in a formatted manner using format() function
  6. Rust program to create a date object using ymd() function
  7. Rust program to create a date-time object using ymd() and and_hms() function
  8. Rust program to get the date of the specified day of the specified year
  9. Rust program to demonstrate the and_hms_milli(), and_hms_micro(), and and_hms_nano() functions
  10. Rust program to print the current year using year() method
  11. Rust program to print the current month using month() method
  12. Rust program to print the current day using day() method
  13. Rust program to print the current hour, minute, second individually
  14. Rust program to print today's weekday using the weekday () method
  15. Rust program to compare weekdays with a current weekday
  16. Rust program to get the current weekday number from Monday
  17. Rust program to print the day of the year
  18. Rust program to demonstrate the Utc::today() and Local::today() functions
  19. Rust program to demonstrate the Utc::now().date() and Utc::now().time() functions
  20. Rust program to convert local date-time in UTC date-time
  21. Rust program to print the current date-time according to CHINA time-zone
  22. Rust program to print the current date-time according to RIO (Brazil) time-zone
  23. Rust program to print the time in 12-hour format
  24. Rust program to demonstrate the num_days_from_ce() function
  25. Rust program to print the UTC date-time in RFC 2822
  26. Rust program to print the UTC date-time in RFC 3339
  27. Rust program to parse the date-time from RFC 2822 string
  28. Rust program to parse the date-time from RFC 3339 string
  29. Rust program to parse only time from a string
  30. Rust program to parse only date from a string
  31. Rust program to parse the date and time from a string



Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.