ocaml-community / ISO8601.ml

Parser and printer for date-times in ISO8601
https://ocaml-community.github.io/ISO8601.ml
MIT License
29 stars 13 forks source link

ISO8601 Basic String #2

Closed alexleighton closed 9 years ago

alexleighton commented 9 years ago

ISO8601 defines a "basic" format which contains none of the human-readable separators. See here, third bullet point.

I'm working on a DynamoDB client for OCaml (ocaml-dynamodb). Making an AWS client requires the ability to create an ISO8601 "basic" formatted datetime: see making HTTP requests, second bullet point of HTTP Header Contents.

If you have the bandwidth, I'd like to request a function like string_of_datetime_basic or string_of_datetime_short. Java's Joda-Time library uses "basic". If you don't have the bandwidth, I'm happy to craft a pull request.

sagotch commented 9 years ago

I understand, and it was actually a planned feature, but what was planned was actually more a kind of printf format (with shortener function) like pp_datetime for %Y-%M-%DT%h:%m:%s%z and pp_datetime_basic for %Y%M%DT%h%m%s%z.

alexleighton commented 9 years ago

Thank you!

sagotch commented 9 years ago

No problem. Version 0.2.0 should be available in opam soon.