7 kyu
The Coupon Code
23,146 of 31,243yaphi1
Description:
Story
Your online store likes to give out coupons for special occasions. Some customers try to cheat the system by entering invalid codes or using expired coupons.
Task
Your mission:
Write a function called checkCoupon
which verifies that a coupon code is valid and not expired.
A coupon is no more valid on the day AFTER the expiration date. All dates will be passed as strings in this format: "MONTH DATE, YEAR"
.
Examples:
checkCoupon("123", "123", "July 9, 2015", "July 9, 2015") === true
checkCoupon("123", "123", "July 9, 2015", "July 2, 2015") === false
Date Time
Strings
Fundamentals
Similar Kata:
Stats:
Created | Jun 15, 2014 |
Published | Jun 15, 2014 |
Warriors Trained | 60268 |
Total Skips | 9115 |
Total Code Submissions | 242398 |
Total Times Completed | 31243 |
JavaScript Completions | 23146 |
C# Completions | 3524 |
TypeScript Completions | 1315 |
Python Completions | 3694 |
Total Stars | 589 |
% of votes with a positive feedback rating | 84% of 3395 |
Total "Very Satisfied" Votes | 2525 |
Total "Somewhat Satisfied" Votes | 640 |
Total "Not Satisfied" Votes | 230 |