Last active
December 11, 2015 15:38
-
-
Save prcaen/4622011 to your computer and use it in GitHub Desktop.
Return year with two digits
If is already a two digits year it return the two digits
eg :
- 2014 => 14
- 14 => 14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private int _twoDigitsYear(int year) { | |
if (year > 0) | |
year = year % 100; | |
return year; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment