@HLEFunction(nid=0x4B1B5E82,version=150) public int sceRtcCheckValid(ScePspDateTime time){
  Calendar cal=new GregorianCalendar(time.year,time.month - 1,time.day,time.hour,time.minute,time.second);
  int result=0;
  if (time.year < 1582 || time.year > 3000) {
    result=PSP_TIME_INVALID_YEAR;
  }
 else   if (time.month < 1 || time.month > 12) {
    result=PSP_TIME_INVALID_MONTH;
  }
 else   if (time.day < 1 || time.day > 31) {
    result=PSP_TIME_INVALID_DAY;
  }
 else   if (time.hour < 0 || time.hour > 23) {
    result=PSP_TIME_INVALID_HOUR;
  }
 else   if (time.minute < 0 || time.minute > 59) {
    result=PSP_TIME_INVALID_MINUTES;
  }
 else   if (time.second < 0 || time.second > 59) {
    result=PSP_TIME_INVALID_SECONDS;
  }
 else   if (time.microsecond < 0 || time.microsecond >= 1000000) {
    result=PSP_TIME_INVALID_MICROSECONDS;
  }
 else   if (cal.get(Calendar.DAY_OF_MONTH) != time.day) {
    result=PSP_TIME_INVALID_DAY;
  }
  if (log.isDebugEnabled()) {
    log.debug(String.format("sceRtcCheckValid time=%s, cal=%s, returning 0x%08X",time,cal,result));
  }
  return result;
}

@ HLEFunction ( nid = 0x4B1B5E82 , version = 150 ) public int sceRtcCheckValid ( ScePspDateTime time ) { Calendar cal = new GregorianCalendar ( time . year , time . month - 1 , time . day , time . hour , time . minute , time . second ) ; int result = 0 ; if ( time . year < 1582 || time . year > 3000 ) { result = PSP_TIME_INVALID_YEAR ; } else if ( time . month < 1 || time . month > 12 ) { result = PSP_TIME_INVALID_MONTH ; } else if ( time . day < 1 || time . day > 31 ) { result = PSP_TIME_INVALID_DAY ; } else if ( time . hour < 0 || time . hour > 23 ) { result = PSP_TIME_INVALID_HOUR ; } else if ( time . minute < 0 || time . minute > 59 ) { result = PSP_TIME_INVALID_MINUTES ; } else if ( time . second < 0 || time . second > 59 ) { result = PSP_TIME_INVALID_SECONDS ; } else if ( time . microsecond < 0 || time . microsecond >= 1000000 ) { result = PSP_TIME_INVALID_MICROSECONDS ; } else if ( cal . get ( Calendar . DAY_OF_MONTH ) != time . day ) { result = PSP_TIME_INVALID_DAY ; } if ( log . isDebugEnabled ( ) ) { log . debug ( String . format ( "sceRtcCheckValid time=%s, cal=%s, returning 0x%08X" , time , cal , result ) ) ; } return result ; }
validate pspdate component ranges
