Minor refactoring of util functions
Define true and false macros when Visual Studio compiler is used
Minor refactoring of parse_number function
Only accept years between 0001 and 9999 (inclusive)