diff --git a/CHANGELOG.md b/CHANGELOG.md index 3eb63bd..bfa5805 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] -## TODO +> TODO + +## 0.1.0 (2018-07-24) + +First beta version. + +## Add + +Provides methods: - [x] to_int8 - [x] to_int16 @@ -16,6 +24,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - [x] to_float32 - [x] to_float64 - [x] to_bool -- [x] to_time +- [x] to_time(location : Time::Location? = nil, formatters : Array(String)? = nil) + +Monkey Patching list: + +- String +- Int8/Int16/Int32/Int64 +- Float32/Float64 +- Bool +- Time +- JSON::Any +- YAML::Any -[Unreleased]: https://github.com/icyleaf/popcorn/compare/25a00baffd41f4ac8a071330038916375904b46d...HEAD +[Unreleased]: https://github.com/icyleaf/popcorn/compare/v0.1.0...HEAD +[0.1.0]: https://github.com/icyleaf/popcorn/compare/25a00baffd41f4ac8a071330038916375904b46d...v0.1.0 diff --git a/README.md b/README.md index b0d3eee..4270d6d 100644 --- a/README.md +++ b/README.md @@ -23,12 +23,13 @@ Popcorn is easy and safe from one type to another tool. Popcorn proviedes a handful of `to_xxx`/`to_xxx?` methods and `xxx` is full type name, This is distinguish between built-in methods in Crystal. +- to_int16 - to_int - to_int64 - to_float32 -- to_float +- to_float64 - to_bool -- to_time +- to_time(location : Time::Location? = nil, formatters : Array(String)? = nil) - to_string (alias to to_s in Crystal). ```crystal @@ -46,7 +47,15 @@ Popcorn.to_time("2018-07-23T10:11:22Z", Time::Location.load("Asia/Shanghai")) # Popcorn.to_time("Tue, 20 Jan 2018", formatter: ["%a, %d %b %Y"]) # => Time.new(2018, 7, 23, 10, 11, 22, location: Time::Location::UTC) ``` -Also these methods had been inject to Crystal literals, you can call it directly, such like: +Also these methods had been inject to Crystal literals, you can call it directly, Monkey Patching list: + +- String +- Int8/Int16/Int32/Int64 +- Float32/Float64 +- Bool +- Time +- JSON::Any +- YAML::Any ```crystal require "popcorn"