Changed 'encode' method on Day to 'to_json'