Plugins - Time Extensions

StarAdd to favorites

Minor extensions to Time and Date to make your code more readable.

How often have you written code like this:

 if @time >= Time.now then
   # In past
 else
   # In future
 end

This plugin / gem allows you to write the following instead:

 if @time.in_past? then
   # In past
 else
   # In future
 end

This is simple, but makes the code more readable.

François Beausoleil

http://blog.teksol.info/articles/2006/11/13/timeextensions-plugin

svn://svn.teksol.info/svn/rails/plugins/time_extensions

  • Currently 0.0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Misc. Enhancements

Tags

Comments

Add a comment

Search Plugins

Query syntax

Plugins by Category

Sponsors

Rails Kits: Get Code. Get Moving.

Have a comment?