utmscale.h

Go to the documentation of this file.
00001 /*
00002 *******************************************************************************
00003 * Copyright (C) 2004 - 2006, International Business Machines Corporation and
00004 * others. All Rights Reserved.
00005 *******************************************************************************
00006 */
00007 
00008 #ifndef UTMSCALE_H
00009 #define UTMSCALE_H
00010 
00011 #include "unicode/utypes.h"
00012 
00013 #if !UCONFIG_NO_FORMATTING
00014 
00195 typedef enum UDateTimeScale {
00202     UDTS_JAVA_TIME = 0,
00203 
00210     UDTS_UNIX_TIME,
00211     
00218     UDTS_ICU4C_TIME,
00219     
00226     UDTS_WINDOWS_FILE_TIME,
00227     
00234     UDTS_DOTNET_DATE_TIME,
00235     
00242     UDTS_MAC_OLD_TIME,
00243     
00250     UDTS_MAC_TIME,
00251     
00258     UDTS_EXCEL_TIME,
00259     
00266     UDTS_DB2_TIME,
00267 
00271     UDTS_MAX_SCALE
00272 } UDateTimeScale;
00273 
00282 typedef enum UTimeScaleValue {
00291     UTSV_UNITS_VALUE = 0,
00292 
00301     UTSV_EPOCH_OFFSET_VALUE=1,
00302 
00311     UTSV_FROM_MIN_VALUE=2,
00312 
00321     UTSV_FROM_MAX_VALUE=3,
00322 
00331     UTSV_TO_MIN_VALUE=4,
00332 
00341     UTSV_TO_MAX_VALUE=5,
00342 
00343 #ifndef U_HIDE_INTERNAL_API
00344 
00355     UTSV_EPOCH_OFFSET_PLUS_1_VALUE=6,
00356 
00368     UTSV_EPOCH_OFFSET_MINUS_1_VALUE=7,
00369 
00380     UTSV_UNITS_ROUND_VALUE=8,
00381 
00392     UTSV_MIN_ROUND_VALUE=9,
00393 
00404     UTSV_MAX_ROUND_VALUE=10,
00405 
00406 #endif /* U_HIDE_INTERNAL_API */
00407 
00413     UTSV_MAX_SCALE_VALUE=11
00414 
00415 } UTimeScaleValue;
00416 
00427 U_STABLE int64_t U_EXPORT2
00428     utmscale_getTimeScaleValue(UDateTimeScale timeScale, UTimeScaleValue value, UErrorCode *status);
00429 
00430 /* Conversion to 'universal time scale' */
00431 
00443 U_STABLE int64_t U_EXPORT2
00444     utmscale_fromInt64(int64_t otherTime, UDateTimeScale timeScale, UErrorCode *status);
00445 
00446 /* Conversion from 'universal time scale' */
00447 
00459 U_STABLE int64_t U_EXPORT2
00460     utmscale_toInt64(int64_t universalTime, UDateTimeScale timeScale, UErrorCode *status);
00461 
00462 #endif /* #if !UCONFIG_NO_FORMATTING */
00463 
00464 #endif
00465 

Generated on Mon Aug 13 07:17:25 2007 for ICU 3.6 by  doxygen 1.5.2