Rubin aktuelles Datum und Uhrzeit
require 'date'
date_time = DateTime.now
curr_date_time = date_time.strftime "%d/%m/%Y %H:%M:%S"
puts curr_date_time
Bad Butterfly
require 'date'
date_time = DateTime.now
curr_date_time = date_time.strftime "%d/%m/%Y %H:%M:%S"
puts curr_date_time
require 'date'
Date.new(2001,2,25) #=> #<Date: 2001-02-25
Date.jd(2451966) #=> #<Date: 2001-02-25
Date.ordinal(2001,56) #=> #<Date: 2001-02-25
Date.commercial(2001,8,7) #=> #<Date: 2001-02-25
Date.parse('2001-02-25') #=> #<Date: 2001-02-25
Date.strptime('25-02-2001', '%d-%m-%Y') #=> #<Date: 2001-02-25
Time.new(2001,2,25).to_date #=> #<Date: 2001-02-25