Datebox initialization, dumb question


#1

I’ve just been testing out the dateboxes I created Friday.

They seem to be working good except I had a couple I wanted to
initialize with today’s date.

With the scaffold code it happened automatically.

With the datebox engine I’m having to do it manually.

I’m using ‘:date_started => Time.now.strftime("%m/%d/%Y")’

Is there another preset variable floating around that would be cleaner?

Greg

Greg F.
The Norcross Group
Forensics for the 21st Century


#2

Greg F. wrote:

I’ve just been testing out the dateboxes I created Friday.

They seem to be working good except I had a couple I wanted to
initialize with today’s date.

With the scaffold code it happened automatically.

With the datebox engine I’m having to do it manually.

I’m using ‘:date_started => Time.now.strftime("%m/%d/%Y")’

Is there another preset variable floating around that would be cleaner?

If it’s datetime:

:date_started => Time.now()

If it’s date:

:dated_started => Date.today()


#3

On 2/21/06, Henning P. removed_email_address@domain.invalid wrote:

I’m using ‘:date_started => Time.now.strftime("%m/%d/%Y")’

Is there another preset variable floating around that would be cleaner?

If it’s datetime:

:date_started => Time.now()

If it’s date:

:dated_started => Date.today()

Thanks,

I saw the Date class in the ruby book, but not the today() method.

Greg

Greg F.
The Norcross Group
Forensics for the 21st Century