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

Timestamp datatype #280

Open
jclark opened this issue Jul 26, 2019 · 2 comments
Open

Timestamp datatype #280

jclark opened this issue Jul 26, 2019 · 2 comments
Labels
enhancement Enhancement to language design grpc Improves support for gRPC and protocol buffers lang Relates to the Ballerina language specification
Milestone

Comments

@jclark
Copy link
Collaborator

jclark commented Jul 26, 2019

Provide additional timestamp basic type.

This is complicated and will need a separate design doc.

@jclark jclark added lang Relates to the Ballerina language specification grpc Improves support for gRPC and protocol buffers enhancement Enhancement to language design labels Jul 26, 2019
@jclark jclark added this to the 2019R4 milestone Aug 14, 2019
@jclark
Copy link
Collaborator Author

jclark commented Aug 14, 2019

There is now a proposal. See #287 for discussion issue.

@jclark jclark modified the milestones: 2019R5, 2020R1, 2020R2 Dec 21, 2019
@jclark
Copy link
Collaborator Author

jclark commented Mar 1, 2021

I suspect there will be several data-types like timestamp. What we need from these data-types is

  • each one is its own type (sort of like distinct types)
  • works as anydata
  • immutable (probably)
  • have a string representation (e.g. ISO 8601 for timestamp)
  • handled in JSON by representing as a string
  • fromJsonWithType and toJson deal with it by converting from and to string representation
  • should be able to define ordering

We really don't want these data-types to be keywords, since that will break code every time we add one.

It would be nice if we could add some generic features that allow this to be done at the library level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement to language design grpc Improves support for gRPC and protocol buffers lang Relates to the Ballerina language specification
Projects
None yet
Development

No branches or pull requests

1 participant