positivist_date v0.1.2

PostivistDate module to replace the traditional Time module for the positivist fans :D

positivist_date Build Status

Implementation of the Positivist Calendar as an alternative to Crystal's Time

Installation

Add to your shard.yml

dependencies:
  positivist_date:
    github: tpei/positivist_date
    branch: master

and then install the library into your project with

$ crystal deps

Usage

# Can be used as Time would be
pd = PositivistDate.new(224, 6, 13, 13, 37)
pd.hour # => 13
pd.saturday? # => true

# allows converting to time instance
pd.to_time # => #<Time:0x10c581fa0>

# PostivistDate instances can be created from Time instances
PositivistDate.from_time Time.now # => #<PositivistDate:0x1084f9f50>

Development

TODO: Write development instructions here

Contributing

  1. Fork it ( https://github.com/tpei/positivist_date/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

  • tpei TPei - creator, maintainer
Repository

positivist_date

Owner
Statistic
  • 0
  • 0
  • 5
  • 0
  • 0
  • almost 7 years ago
  • June 24, 2017
License

MIT License

Links
Synced at

Fri, 03 May 2024 06:42:44 GMT

Languages