Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling date and times as object classes #51

Open
cdmwebs opened this issue Dec 10, 2023 · 0 comments
Open

Handling date and times as object classes #51

cdmwebs opened this issue Dec 10, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@cdmwebs
Copy link
Member

cdmwebs commented Dec 10, 2023

The API expects dates and times to be serialized.

def datetime_as_object(datetime)
  {
    __class__: "datetime",
    iso_string: datetime.utc.iso8601
  }
end

def date_as_object(date)
  {
    __class__: "date",
    iso_string: date.iso8601
  }
end

Let's add this to the request/response handler so we don't have to deal with this in application code.

@cdmwebs cdmwebs added the enhancement New feature or request label Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant