ICU 73.2  73.2
utmscale.h
Go to the documentation of this file.
00001 // © 2016 and later: Unicode, Inc. and others.
00002 // License & terms of use: http://www.unicode.org/copyright.html
00003 /*
00004 *******************************************************************************
00005 * Copyright (C) 2004 - 2008, International Business Machines Corporation and
00006 * others. All Rights Reserved.
00007 *******************************************************************************
00008 */
00009 
00010 #ifndef UTMSCALE_H
00011 #define UTMSCALE_H
00012 
00013 #include "unicode/utypes.h"
00014 
00015 #if !UCONFIG_NO_FORMATTING
00016 
00204 typedef enum UDateTimeScale {
00211     UDTS_JAVA_TIME = 0,
00212 
00219     UDTS_UNIX_TIME,
00220     
00227     UDTS_ICU4C_TIME,
00228     
00235     UDTS_WINDOWS_FILE_TIME,
00236     
00243     UDTS_DOTNET_DATE_TIME,
00244     
00251     UDTS_MAC_OLD_TIME,
00252     
00259     UDTS_MAC_TIME,
00260     
00267     UDTS_EXCEL_TIME,
00268     
00275     UDTS_DB2_TIME,
00276 
00284     UDTS_UNIX_MICROSECONDS_TIME,
00285 
00286 #ifndef U_HIDE_DEPRECATED_API
00287 
00291     UDTS_MAX_SCALE
00292 #endif  /* U_HIDE_DEPRECATED_API */
00293 
00294 } UDateTimeScale;
00295 
00304 typedef enum UTimeScaleValue {
00313     UTSV_UNITS_VALUE = 0,
00314 
00323     UTSV_EPOCH_OFFSET_VALUE=1,
00324 
00333     UTSV_FROM_MIN_VALUE=2,
00334 
00343     UTSV_FROM_MAX_VALUE=3,
00344 
00353     UTSV_TO_MIN_VALUE=4,
00354 
00363     UTSV_TO_MAX_VALUE=5,
00364 
00365 #ifndef U_HIDE_INTERNAL_API
00366 
00377     UTSV_EPOCH_OFFSET_PLUS_1_VALUE=6,
00378 
00390     UTSV_EPOCH_OFFSET_MINUS_1_VALUE=7,
00391 
00402     UTSV_UNITS_ROUND_VALUE=8,
00403 
00414     UTSV_MIN_ROUND_VALUE=9,
00415 
00426     UTSV_MAX_ROUND_VALUE=10,
00427 
00428 #endif /* U_HIDE_INTERNAL_API */
00429 
00430 #ifndef U_HIDE_DEPRECATED_API
00431 
00437     UTSV_MAX_SCALE_VALUE=11
00438 #endif  /* U_HIDE_DEPRECATED_API */
00439 
00440 } UTimeScaleValue;
00441 
00452 U_CAPI int64_t U_EXPORT2
00453     utmscale_getTimeScaleValue(UDateTimeScale timeScale, UTimeScaleValue value, UErrorCode *status);
00454 
00455 /* Conversion to 'universal time scale' */
00456 
00468 U_CAPI int64_t U_EXPORT2
00469     utmscale_fromInt64(int64_t otherTime, UDateTimeScale timeScale, UErrorCode *status);
00470 
00471 /* Conversion from 'universal time scale' */
00472 
00484 U_CAPI int64_t U_EXPORT2
00485     utmscale_toInt64(int64_t universalTime, UDateTimeScale timeScale, UErrorCode *status);
00486 
00487 #endif /* #if !UCONFIG_NO_FORMATTING */
00488 
00489 #endif
00490