Sha256: 76630faedae8f77603bc2ff9925d699656b13c26af61f3edf8b4358383b75662

Contents?: true

Size: 600 Bytes

Versions: 1

Compression:

Stored size: 600 Bytes

Contents

# -*- coding: utf-8 -*-
=begin rdoc
Please see README
=end


class Time


  # @return [String] a time stamp string in standard format: "YYYY-MM-DD HH:MM:SSZ"
  #
  # This standard format is specified in IETF RFC 3339 and ISO 8601.
  #
  # @see http://www.ietf.org/rfc/rfc3339.txt
  #
  # @example
  #   Time.now.stamp 
  #   => "2010-12-31 12:59:59Z" 

  def stamp
    getutc.strftime('%Y-%m-%d %H:%M:%SZ')
  end


  # Shorthand for Time.now.stamp
  #
  # @example
  #   Time.stamp
  #    => "2010-12-31 12:59:59Z" 
  #
  # @return [String] Time.now.stamp

  def self.stamp
    now.stamp
  end


end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sixarm_ruby_time_stamp-1.1.0 lib/sixarm_ruby_time_stamp.rb