Class: Date
- Inherits:
-
Object
- Object
- Date
- Defined in:
- lib/ecraft/extensions/date.rb
Overview
This is a bit crazy, but we need it because the 'json/add/core' adds a really weird serialization of date fields. It looks like this: "json_class":"Date","y":2000,"m":1,"d":1,"sg":2299161"json_class":"Date","y":2000,"m":1,"d":1,"sg":2299161.0
Instance Method Summary collapse
Instance Method Details
#to_json(*_args) ⇒ Object
7 8 9 |
# File 'lib/ecraft/extensions/date.rb', line 7 def to_json(*_args) format('"%d-%02d-%02d"', year, month, day) end |