Sha256: c805a11dca7b88afd76bc05a519b369d57b19bdd9b18f3be25c9822b734587d6

Contents?: true

Size: 485 Bytes

Versions: 1

Compression:

Stored size: 485 Bytes

Contents

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


class Time


  # @return [String] time packed into a short string: "YYYYMMDDHHMMSS"
  #
  # The time is converted to UTC.
  #
  # @example
  #   Time.now.terse 
  #   => "20101231125959" 

  def terse
    getutc.strftime('%Y%m%d%H%M%S')
  end


  # Shorthand for Time.now.terse
  #
  # @example
  #   Time.terse
  #    => "20101231125959" 
  #
  # @return [String] Time.now.terse

  def self.terse
    now.terse
  end


end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sixarm_ruby_time_terse-1.1.0 lib/sixarm_ruby_time_terse.rb