Sha256: c2979ee776005563fdfa067edf87a2e8cbfd0edbbd59acd172771a60c0474e34

Contents?: true

Size: 605 Bytes

Versions: 1

Compression:

Stored size: 605 Bytes

Contents

# -*- coding: utf-8 -*-
=begin rdoc
Please see README.rdoc
=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.0.0 lib/sixarm_ruby_time_stamp.rb