Module: CompactTime

Included in:
Date, Time
Defined in:
lib/compact_time.rb

Constant Summary collapse

Alph =
[nil, "A", "B", "C", "D", "E", "F", "G"]

Instance Method Summary collapse

Instance Method Details

#compact_dateObject



5
# File 'lib/compact_time.rb', line 5

def compact_date; "%04d%s%02d%s" % compact_date_array end

#compact_date_arrayObject



7
# File 'lib/compact_time.rb', line 7

def compact_date_array; [ctn_year, ctn_quatery, ctn_week, ctn_day] end

#compact_date_timeObject



4
# File 'lib/compact_time.rb', line 4

def compact_date_time; "#{compact_date} #{compact_time}" end

#compact_timeObject



6
# File 'lib/compact_time.rb', line 6

def compact_time; strftime("%T.%L%:z") end