Class: DateTime

Inherits:
Date show all
Defined in:
lib/wukong/schema.rb,
lib/wukong/extensions/date_time.rb

Constant Summary collapse

FLAT_FORMAT =

strftime() format to flatten a date

"%Y%m%d%H%M%S"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.to_avroObject



63
# File 'lib/wukong/schema.rb', line 63

def to_avro() 'long'          end

.to_pigObject



34
# File 'lib/wukong/schema.rb', line 34

def to_pig() 'long'          end

Instance Method Details

#to_flatObject

Flatten



41
42
43
# File 'lib/wukong/extensions/date_time.rb', line 41

def to_flat
  strftime(FLAT_FORMAT)
end