phpf 1.0.0

A Ruby port of PHP’s date function.

HOWTO get it

Use RubyGems (gem install phpf), or download from RubyForge.

HOWTO use it

Either use Time#phpf, or Kernel#date, e.g.,

require 'phpf'

time = Time.parse('1/1/2008 12:34:56')

time.phpf('jS F Y H:i')  # => "1st January 2008 12:34"

time.to_i  # => 1199190896

date('jS F Y H:i', 1199190896)  # => "1st January 2008 12:34"

See Also

PHP’s date() function in Python

14th Feb 2008

Tim Fletcher