timestamp.cr

Timestamps in crystal-lang. Adds `.from_timestamp` and `#to_timestamp` methods to `Time`

timestamp.cr

Timestamp implementation for crystal-lang.

Installation

Add it to your Projectfile

deps do
  github "waterlink/timestamp.cr"
end

Usage

require "timestamp"

Create Time from timestamp:

puts Time.from_timestamp(1427042133.035) #=> 2015-03-22 16:35:33

Get timestamp from Time instance:

puts Time.now.to_timestamp   #=> 1427042133.035

Contributing

  1. Fork it ( https://github.com/waterlink/timestamp.cr/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

Repository

timestamp.cr

Owner
Statistic
  • 5
  • 0
  • 0
  • 0
  • 0
  • about 9 years ago
  • March 22, 2015
License

MIT License

Links
Synced at

Fri, 17 May 2024 11:04:27 GMT

Languages