Logo Search packages:      
Sourcecode: icu version File versions  Download package

double Calendar::getTimeInMillis ( UErrorCode status  )  const [protected, inherited]

Gets this Calendar's current time as a long.

Parameters:
status Output param set to success/failure code on exit. If any value previously set in the time field is invalid or restricted by leniency, this will be set to an error status.
Returns:
the current time as UTC milliseconds from the epoch. ICU 2.0
Gets this Calendar's current time as a long.
Returns:
the current time as UTC milliseconds from the epoch.

Definition at line 988 of file calendar.cpp.

References Calendar::fIsTimeSet, Calendar::fTime, and U_FAILURE.

Referenced by Calendar::add(), Calendar::after(), Calendar::before(), Calendar::fieldDifference(), Calendar::operator==(), Calendar::roll(), and IslamicCalendar::setCivil().

{
    if(U_FAILURE(status)) 
        return 0.0;

    if ( ! fIsTimeSet) 
        ((Calendar*)this)->updateTime(status);

    /* Test for buffer overflows */
    if(U_FAILURE(status)) {
        return 0.0;
    }
    return fTime;
}


Generated by  Doxygen 1.6.0   Back to index