GithubHelp home page GithubHelp logo

cal's Introduction

Cal

Goal / Intentions

Cal.rb was created in order to simulate the behavior of the Unix cal program. 

Features

This library allows the user to print out the accurate calendar for a given month or entire year.

Limitations

Currently, cal.rb only works for years 1800-3000.

How to use

To print a month, type in terminal:

	ruby cal.rb 2 2012
	
	-or-
	
	ruby cal.rb feb 2012


To print an entire year, type in terminal:

	ruby cal.rb 2012

Dependencies

Ruby vs. 1.9.3

File Structure

-readme.md

-rakefile

-cal.rb

-lib
	-calender.rb
	-constants.rb
-tests
	-test_cal.rb

Author Information

Marilyn Franklin

Contribution Guidelines

For all pull requests:

1. Ensure new code is properly documented

2. Implement new unit tests

3. All tests must pass

Bugs / To-Do

Cal.rb does not automatically detect current year

Changelog

10-01-2012
	-calender.rb code now works for full year and individual months

	-calender.rb added documentation for zeller's congruence and leap year calculations

	-readme.md added 

Difficult Code

In zeller's congruence, January and February are calculated as months 13 and 14. Also, 
they are counted as being apart of the previous year.

Resources

Information on Zeller's Congruence was found at:
http://en.wikipedia.org/wiki/Zeller%27s_congruence

Information on determining leap years was found at:
http://en.wikipedia.org/wiki/Leap_year

cal's People

Contributors

marilynfranklin avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.