public static void toComponents()

in java/main/src/main/java/com/epam/deltix/hdtime/Convert.java [608:629]


        public static void toComponents(long dt, Components components) {
            components.sign = 0;
            long sign = dt >> 63;
            long day = (dt - sign) / NS_IN_DAY + sign;
            dt -= day * NS_IN_DAY;
            long old = dt;
            dt /= NS_IN_MINUTE;
            long sec = old - dt * NS_IN_MINUTE;
            old = dt;
            dt /= MINUTES_IN_HOUR;
            long secOld = sec;
            sec /= NS_IN_SECOND;
            components.minute = (int)(old - dt * MINUTES_IN_HOUR);
            components.nanosecond = (int)(secOld - sec * NS_IN_SECOND);
            components.second = (int)sec;
            components.hour = (int)(dt);

            GregorianCalendar calendar = calendarFromMillis(day * MILLISECONDS_IN_DAY);
            components.day = calendar.get(Calendar.DAY_OF_MONTH);
            components.month = calendar.get(Calendar.MONTH) + 1;
            components.year = calendar.get(Calendar.YEAR);
        }