/leap-year-pair

EPICODUS STUDENT PROJECT | BDD Practice: Build a leap-year checker

Primary LanguageJavaScript

EPICODUS STUDENT PROJECT | BDD Practice: Build a leap-year checker

Leap Year Checker, June 8, 2016

By Marty Fitchen, Maldon Meehan, Epicodus

Description

This is an Epicodus student project creating a web page that uses front-end user interface logic to gather an input and check if it is a leap year (using back-end logic). This is an lesson in Behavior Driven Development (BDD) to learn to code using just the least amount of clean code to establish true and false booleans based on expected outputs based on potential user inputs. In addition, adding behaviors that will ignore various user inputs (i.e., " ", a, B, !, etc.).

  • The program should return when a year is not a leap year.
    • Input Example: 1993
    • Output Example: false
  • The program should return 'true' for years divisible by 4, since those are leap years.
    • Input Example: 2004
    • Output Example: true
  • The program should return 'false' for years divisible by 100, since those are not leap years.
    • Input Example: 1900
    • Output Example: false
  • The program should return 'true' for years divisible by 400, since those are leap years.
    • Input Example: 2000
    • Output Example: true
  • The program should return 'false' for inputted letters (which would then include full words [real or not] and sentences, such as "Nineteen Ninety Nine").
    • Input Example: a (or A)
    • Output Example: false

Setup/Installation Requirements

Known Bugs

  • Any user input other than a year currently returns "NaN is not a leap year".

Support and contact details

If you run into any issues or have questions, ideas, or concerns, please feel free to contact Marty at mfitchen@gmail.com or Maldon at maldonmeehan@gmail.com.

Technologies Used

  • HTML
  • CSS
  • JavaScript
  • jQuery (jquery-1.12.4.js)
  • Bootstrap (bootstrap.min.css)
  • Atom
  • Terminal
  • Git

License

MIT License

Copyright (c) 2016 Marty Fitchen, Maldon Meehan, Epicodus

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.