Hackfut Security File Manager
Current Path:
/opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/strptime-0.2.3
opt
/
td-agent
/
embedded
/
lib
/
ruby
/
gems
/
2.4.0
/
gems
/
strptime-0.2.3
/
📁
..
📄
.clang-format
(1.96 KB)
📄
.gitignore
(124 B)
📄
.rspec
(31 B)
📄
.travis.yml
(268 B)
📄
Gemfile
(93 B)
📄
LICENSE.txt
(1.36 KB)
📄
README.md
(1.51 KB)
📄
Rakefile
(1010 B)
📄
appveyor.yml
(400 B)
📁
bin
📁
ext
📁
lib
📄
strptime.gemspec
(1.15 KB)
Editing: README.md
# Strptime [](https://travis-ci.org/nurse/strptime) [](https://ci.appveyor.com/project/nurse/strptime/branch/master) Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/strptime`. To experiment with that code, run `bin/console` for an interactive prompt. TODO: Delete this and the text above, and describe your gem ## Installation Add this line to your application's Gemfile: ```ruby gem 'strptime' ``` And then execute: $ bundle Or install it yourself as: $ gem install strptime ## Usage ### Strptime for time parsing ```ruby require 'strptime' parser = Strptime.new('%Y-%m-%dT%H:%M:%S%z') parser.exec('2015-12-25T12:34:56+09') #=> 2015-12-25 12:34:56 +09:00 parser.execi('2015-12-25T12:34:56+09') #=> 1451014496 ``` ### Strftime for time formatting ```ruby require 'strptime' now = Time.now formatter = Strftime.new('%Y-%m-%dT%H:%M:%S.%L %z') formatter.exec(now) # 2017-12-29T07:24:31.505 +0900 formatter.execi(now.to_i) # 2017-12-28T22:24:31.000 +0000 ``` ## Contributing 1. Fork it ( https://github.com/nurse/strptime/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
Upload File
Create Folder