Code refactoring (use Calendar.get(HOUR))