RUBY: Date and Time functions in ruby on rails


To get the current time:
time = Time.now

To get the current year:
year =  Time.now.Year

No comments:

Post a Comment