Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This is a total overkill - converting date to string and parsing it, while there are methods that already return proper numeric values for each date part.
In addition, using if's THEN clause to only return true, and ELSE clause to only return false is completely redundant. Since if's expression must evaluate to bool-y value, you may just return it right away.
Also, there are two bad smells: