Create a Date object representing the current date and time. Print it out.
If you can also do this without creating a Date object you can show that too.
ruby puts DateTime.now
puts DateTime.now
clojure (import 'java.util.Date)
(println (str (Date.)))
(import 'java.util.Date)
(println (str (Date.)))
fantom echo(DateTime.now)
class SolutionXX
{
Void main()
{
echo(DateTime.now)
}
}
Submit a new solution for
ruby,
clojure, or
fantom
There are 16 other solutions in
additional languages (
cpp,
csharp,
erlang,
fsharp ...)