private GradsTimeStruct makeTimeStruct ( Calendar calendar ) { GradsTimeStruct ts = new GradsTimeStruct ( ) ; ts . year = calendar . get ( Calendar . YEAR ) ; ts . month = calendar . get ( Calendar . MONTH ) + 1 ; // MONTH is zero based ts . day = calendar . get ( Calendar . DAY_OF_MONTH ) ; ts . hour = calendar . get ( Calendar . HOUR_OF_DAY ) ; ts . minute = calendar . get ( Calendar . MINUTE ) ; ts . jday = calendar . get ( Calendar . DAY_OF_YEAR ) ; return ts ; }
Make a GradsTimeStruct from the calendar state