Topic: Convert month to double-digit
I am using Ruby to generate a url within my Rails app...
http://domain.com/<%= @movie.year %>/<%= @movie.month %>/<%= @movie.file_name %>
The @movie.month is coming out as "4" instead of "04". Anyone know of a way to have this expressed as two digits so a leading zero is displayed?
Last edited by jman (2007-04-14 02:00:31)