Class: Time
- Defined in:
- opal/stdlib/json.rb,
 opal/stdlib/time.rb,
 opal/stdlib/native.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.parse(str) ⇒ Object
| 2 3 4 | # File 'opal/stdlib/time.rb', line 2 def self.parse(str) `new Date(Date.parse(str))` end | 
Instance Method Details
#iso8601 ⇒ Object
| 6 7 8 | # File 'opal/stdlib/time.rb', line 6 def iso8601 strftime('%FT%T%z') end | 
#to_json ⇒ Object
| 193 194 195 | # File 'opal/stdlib/json.rb', line 193 def to_json strftime('%FT%T%z').to_json end | 
#to_n ⇒ Object
| 520 521 522 | # File 'opal/stdlib/native.rb', line 520 def to_n self end |