Kimono.KTimeZone.TransitionIndex C# (CSharp) Method

TransitionIndex() public method

Return all daylight saving transitions, in time order. If desired, the transitions returned may be restricted to a specified time range. Note that some time zone data sources (such as system time zones accessed via the system libraries) may not allow a list of daylight saving time changes to be compiled easily. In such cases, this method will return an empty list. name="start" start UTC date/time, or invalid date/time to return all transitions up to end. start.timeSpec() must be Qt.UTC, else start will be considered invalid. name="end" end UTC date/time, or invalid date/time for no end. end.timeSpec() must be Qt.UTC, else end will be considered invalid. Find the last daylight savings time transition at or before a given UTC or local time. Because of daylight savings time shifts, a local time may occur twice or may not occur at all. In the former case, the transitions at or before both occurrences of dt may optionally be calculated and returned in secondTransition. The latter case may optionally be detected by use of validTime. name="dt" date/time. dt.timeSpec() may be set to Qt.UTC or Qt.LocalTime. name="secondTransition" if non-null, and the dt occurs twice, receives the transition for the second occurrence. Otherwise, it is set the same as the return value. name="validTime" if non-null, is set to false if dt does not occur, or to true otherwise Find the index to the last daylight savings time transition at or before a given UTC or local time. The return value is the index into the transition list returned by transitions(). Because of daylight savings time shifts, a local time may occur twice or may not occur at all. In the former case, the transitions at or before both occurrences of dt may optionally be calculated and returned in secondIndex. The latter case may optionally be detected by use of validTime. name="dt" date/time. dt.timeSpec() may be set to Qt.UTC or Qt.LocalTime. name="secondIndex" if non-null, and the dt occurs twice, receives the index to the transition for the second occurrence. Otherwise, it is set the same as the return value. name="validTime" if non-null, is set to false if dt does not occur, or to true otherwise
public TransitionIndex ( QDateTime dt, int &secondIndex, bool &validTime ) : int
dt QDateTime
secondIndex int
validTime bool
return int
        public int TransitionIndex(QDateTime dt, ref int secondIndex, ref bool validTime)
        {
            StackItem[] stack = new StackItem[4];
            #if DEBUG
            stack[1].s_class = (IntPtr) DebugGCHandle.Alloc(dt);
            #else
            stack[1].s_class = (IntPtr) GCHandle.Alloc(dt);
            #endif
            stack[2].s_int = secondIndex;
            stack[3].s_bool = validTime;
            interceptor.Invoke("transitionIndex#$$", "transitionIndex(const QDateTime&, int*, bool*) const", stack);
            #if DEBUG
            DebugGCHandle.Free((GCHandle) stack[1].s_class);
            #else
            ((GCHandle) stack[1].s_class).Free();
            #endif
            secondIndex = stack[2].s_int;
            validTime = stack[3].s_bool;
            return stack[0].s_int;
        }

Same methods

KTimeZone::TransitionIndex ( QDateTime dt ) : int
KTimeZone::TransitionIndex ( QDateTime dt, int &secondIndex ) : int