Class: DateTime

Inherits:
Date
  • Object
show all
Defined in:
lib/format.rb,
lib/hijri/gregorian.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Date

_httpdate, _iso8601, _jisx0301, _parse, _rfc2822, _rfc3339, _xmlschema, #asctime, #httpdate, #last_day_of_gregorian_month, #rfc2822, #to_abs

Class Method Details

._strptime(str, fmt = '%FT%T%z') ⇒ Object



1285
1286
1287
# File 'lib/format.rb', line 1285

def self._strptime(str, fmt='%FT%T%z')
  super(str, fmt)
end

Instance Method Details

#iso8601(n = 0) ⇒ Object



1301
1302
1303
# File 'lib/format.rb', line 1301

def iso8601(n=0)
  super() + iso8601_timediv(n)
end

#jisx0301(n = 0) ⇒ Object



1309
1310
1311
# File 'lib/format.rb', line 1309

def jisx0301(n=0)
  super() + iso8601_timediv(n)
end

#rfc3339(n = 0) ⇒ Object



1305
# File 'lib/format.rb', line 1305

def rfc3339(n=0) iso8601(n) end

#strftime(fmt = '%FT%T%:z') ⇒ Object



1281
1282
1283
# File 'lib/format.rb', line 1281

def strftime(fmt='%FT%T%:z')
  super(fmt)
end

#to_hijriObject



25
26
27
# File 'lib/hijri/gregorian.rb', line 25

def to_hijri
  Hijri::DateTime.new *Hijri::Converter.greo_to_hijri(self)
end

#xmlschema(n = 0) ⇒ Object

:nodoc:



1307
# File 'lib/format.rb', line 1307

def xmlschema(n=0) iso8601(n) end