【文件属性】:
文件名称:timestamp.cr:Crystal-lang 中的时间戳。 将 `.from_timestamp` 和 `#to_timestamp` 方法添加到 `Time`
文件大小:5KB
文件格式:ZIP
更新时间:2021-06-17 14:06:18
Crystal
时间戳.cr
Crystal-lang 的时间戳实现。
安装
将其添加到您的项目Projectfile
deps do
github " waterlink/timestamp.cr "
end
用法
require " timestamp "
从时间戳创建Time :
puts Time .from_timestamp( 1427042133.035 ) # => 2015-03-22 16:35:33
从Time实例获取时间戳:
puts Time .now.to_timestamp # => 1427042133.035
贡献
分叉它( )
创建您的功能分支(git checkout -b my-new-feature)
提交您的更改(git commit -am '添加一些功能')
推送到分支(git push origin my-new-featur
【文件预览】:
timestamp.cr-master
----.travis.yml(185B)
----Projectfile(7B)
----LICENSE(1KB)
----src()
--------timestamp.cr(24B)
--------timestamp()
----spec()
--------spec_helper.cr(42B)
--------timestamp()
----.gitignore(16B)
----.deps.lock(3B)
----README.md(805B)
----libs()
--------.keep(0B)