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 32 weeks 13 hours ago – Made popular 31 weeks 5 days ago
Category: Programming   Tags: