mirror of https://github.com/kdl-org/kdl.git
Add some more reserved type annotations
I think it would be useful to get these few more common data types into For the decimal floating types, I referenced [this protobuf discussion](https://github.com/protocolbuffers/protobuf/pull/7039#issuecomment-679083593) and [this](https://github.com/googleapis/googleapis/blob/master/google/type/decimal.proto) I'm not sure what to call out for the currency format, I can't find a standard for that yet. There's a [protobuf money type](https://github.com/googleapis/googleapis/blob/master/google/type/money.proto) that's basically a ISO 4217 currency code plus a decimal number, but I don't really want to invent a suggested money format if there's a real one out there somewhere. For this PR, can we just leave it TBD in order to reserve the type keyword?
This commit is contained in:
parent
f1941b53d3
commit
0de09d7bc5
10
SPEC.md
10
SPEC.md
|
|
@ -236,16 +236,26 @@ Platform-dependent integer types, both signed and unsigned:
|
|||
* `isize`
|
||||
* `usize`
|
||||
|
||||
#### Reserved Type Annotations for Numbers With Decimals:
|
||||
|
||||
IEEE 754 floating point numbers, both single (32) and double (64) precision:
|
||||
|
||||
* `f32`
|
||||
* `f64`
|
||||
|
||||
IEEE754-2008 decimal floating point numbers
|
||||
|
||||
* `decimal64`
|
||||
* `decimal128`
|
||||
|
||||
#### Reserved Type Annotations for Strings:
|
||||
|
||||
* `date-time`: ISO8601 date/time format.
|
||||
* `time`: "Time" section of ISO8601.
|
||||
* `date`: "Date" section of ISO8601.
|
||||
* `duration`: ISO8601 duration format.
|
||||
* `decimal`: IEEE754-2008 decimal string format.
|
||||
* `money`: TBD
|
||||
* `email`: RFC5302 email address.
|
||||
* `idn-email`: RFC6531 internationalized email address.
|
||||
* `hostname`: RFC1132 internet hostname.
|
||||
|
|
|
|||
Loading…
Reference in New Issue