EasySFT

EasySFT is a simple and easier to use interface to Ruby’s Time.strftime. Using real English words instead of symbols makes the format easier to remember. I started this gem mainly because I could never remember the most common strftime modifiers without having to open up the docs for reference.

Using EasySFT is as easy as:

require ‘easysft’

t = Time.now t.easysft(“Weekday, Month Day, Year, Hour:Minute AMPM TZ”)

would return:

Saturday, December 06, 2008, 01:13 AM CST

It also provides an inline way to use it on the current time:

Time.easysft(“Weekday, Month Day, Year, Hour:Minute AMPM TZ”)

returning the same thing as above.

Author

Robert W. Oliver II <[email protected]> www.4gigs.com/easysft

License

Copyright © 2008 Robert W. Oliver, All Rights Reserved.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.