I know in PHP, it’s uses <?php date(Y); ?> to display the current year.
How would I do it in an ROR’s .rthml file?
I know in PHP, it’s uses <?php date(Y); ?> to display the current year.
How would I do it in an ROR’s .rthml file?
<%= Time.new().year %>
You’re the greatest. Thanks, Kates
If you wanna use those strings you used in PHP to display the date in
some particular way -
http://ruby-doc.org/core/classes/Time.html#M000297.
On Jun 14, 10:05 am, Bob S. [email protected]
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs