Class: NetGSM::DATE

Inherits:
Object
  • Object
show all
Defined in:
lib/netgsm_sms/date.rb

Class Method Summary collapse

Class Method Details

.format_date(date) ⇒ Object



11
12
13
# File 'lib/netgsm_sms/date.rb', line 11

def self.format_date(date)
  date.strftime('%d%m%Y%H%M')
end

.n_hour_from_now(duration) ⇒ Object



7
8
9
# File 'lib/netgsm_sms/date.rb', line 7

def self.n_hour_from_now(duration)
  format_date(Time.now + duration*60*60)
end

.nowObject



3
4
5
# File 'lib/netgsm_sms/date.rb', line 3

def self.now
  format_date(Time.now)
end