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
| 181 182 183 | # File 'opal/stdlib/json.rb', line 181 def to_json strftime("%FT%T%z").to_json end | 
#to_n ⇒ Object
| 435 436 437 | # File 'opal/stdlib/native.rb', line 435 def to_n self end |