https://github.com/watson1978/motion-date
This is RubyMotion library which provides methods of Date/DateTime/Time which are same as CRuby Standard Library.
https://github.com/watson1978/motion-date
Last synced: 8 months ago
JSON representation
This is RubyMotion library which provides methods of Date/DateTime/Time which are same as CRuby Standard Library.
- Host: GitHub
- URL: https://github.com/watson1978/motion-date
- Owner: Watson1978
- License: mit
- Created: 2015-07-10T16:47:14.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2024-04-09T04:11:10.000Z (over 2 years ago)
- Last Synced: 2025-01-28T19:49:34.545Z (over 1 year ago)
- Language: Ruby
- Size: 35.2 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# motion-date
This is RubyMotion library which provides methods of Date/DateTime/Time which are same as CRuby Standard Library.
You can see APIs in http://ruby-doc.org/stdlib-2.2.2/libdoc/date/rdoc/index.html
## Installation
Add this line to your application's Gemfile:
gem 'motion-date'
And then execute:
$ bundle
Or install it yourself as:
$ gem install motion-date
## Usage
```
a = Date.new(1993, 2, 24)
b = Date.parse('1993-02-24')
b += 10
b - a #=> 10
b.year #=> 1993
b.strftime('%a') #=> "Sat"
yesterday = Date.today - 1
```
## Contributing
1. Fork it
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 new Pull Request