20

Creating a DateTime object with Ruby

http://feeds.dzone.com

This example creates a date and time variable which represents 22nd March 2008 4:30pm and 12 seconds.

d2 = DateTime.new(y=200,m=3,d=22, h=16,min=30,s=12)

Read »
mark's picture
Created by mark Created 27 weeks 1 day ago – Made popular 26 weeks 6 days ago
Category: Programming   Tags: