Getting the current date
Basic types / Date and time
Getting the current date
Converting from a string
Converting to a string
Comparing dates
Creating a date
Getting the year, month, day
Date arithmetic
Interval between two dates
require
'date'
now1 = DateTime.
now
puts
"now1 is '
#{now1}
'"
now2 =
Time
.
now
puts
"now2 is '
#{now2}
'"
Languages
Python
C
C++
Java
C#
JavaScript
R
Rust
Golang
Delphi
PHP
Swift
Kotlin
Lua
TypeScript
Clojure
Bash
Objective-C