Class: Time

Inherits:
Object
  • Object
show all
Defined in:
lib/zbox/ext/time.rb

Instance Method Summary collapse

Instance Method Details

#to_date1Object


7
8
9
10
11
12
# File 'lib/zbox/ext/time.rb', line 7

def to_date1
 year=self.year
 month=self.month
 day=self.day
  year.to_s+""+month.to_s+""+day.to_s+""
end

#to_date2Object


14
15
16
17
18
19
# File 'lib/zbox/ext/time.rb', line 14

def to_date2
 year=self.year
 month=self.month
 day=self.day
  year.to_s+"-"+month.to_s+"-"+day.to_s
end

#to_fmt1Object


3
4
5
# File 'lib/zbox/ext/time.rb', line 3

def to_fmt1
 strftime("%Y-%m-%d %H:%M") 
end