mittwald / mittwald/api-client-js

It would be convenient if 'date-time' formatted Strings would be typed as JS Dates

Open
#209 0 comments 0 reactions 1 assignee View on GitHub

@mfal is already working on this.

Since Sep 4, 2026.

Dominant language
TypeScript
Stars
2
Forks
0
Avg merge
4d 16h
Merged PRs (30d)
4

Description

Example: If I want to terminate a Contract, I can schedule the Termination for a specific date. Consider following code:

    client.contract.terminateContract({
        contractId: "some-id",
        data: {
            terminationTargetDate: "10/12/2024",
        }
    })

This example will fail because the terminationTargetDate is not following the ISO 8601, which is used for OpenAPI.

    client.contract.terminateContract({
        contractId: "some-id",
        data: {
            terminationTargetDate: new Date(),
        }
    })

This code is much more convenient for the user. The client could be converting JS Dates to date-time Strings in the background before sending the request.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.