ICU 56.1: utmscale.h Source File

ICU 56.1 56.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

utmscale.h
Go to the documentation of this file.
1 /*
2 *******************************************************************************
3 * Copyright (C) 2004 - 2008, International Business Machines Corporation and
4 * others. All Rights Reserved.
5 *******************************************************************************
6 */
7
8 #ifndef UTMSCALE_H
9 #define UTMSCALE_H
10
11 #include "unicode/utypes.h"
12
13 #if !UCONFIG_NO_FORMATTING
14
202 typedef enum UDateTimeScale {
209 UDTS_JAVA_TIME = 0,
210
217 UDTS_UNIX_TIME,
218
225 UDTS_ICU4C_TIME,
226
233 UDTS_WINDOWS_FILE_TIME,
234
241 UDTS_DOTNET_DATE_TIME,
242
249 UDTS_MAC_OLD_TIME,
250
257 UDTS_MAC_TIME,
258
265 UDTS_EXCEL_TIME,
266
273 UDTS_DB2_TIME,
274
282 UDTS_UNIX_MICROSECONDS_TIME,
283
287 UDTS_MAX_SCALE
288 } UDateTimeScale;
289
298 typedef enum UTimeScaleValue {
307 UTSV_UNITS_VALUE = 0,
308
317 UTSV_EPOCH_OFFSET_VALUE=1,
318
327 UTSV_FROM_MIN_VALUE=2,
328
337 UTSV_FROM_MAX_VALUE=3,
338
347 UTSV_TO_MIN_VALUE=4,
348
357 UTSV_TO_MAX_VALUE=5,
358
359 #ifndef U_HIDE_INTERNAL_API
360
371 UTSV_EPOCH_OFFSET_PLUS_1_VALUE=6,
372
384 UTSV_EPOCH_OFFSET_MINUS_1_VALUE=7,
385
396 UTSV_UNITS_ROUND_VALUE=8,
397
408 UTSV_MIN_ROUND_VALUE=9,
409
420 UTSV_MAX_ROUND_VALUE=10,
421
422 #endif /* U_HIDE_INTERNAL_API */
423
429 UTSV_MAX_SCALE_VALUE=11
430
431 } UTimeScaleValue;
432
443 U_STABLE int64_t U_EXPORT2
444 utmscale_getTimeScaleValue(UDateTimeScale timeScale, UTimeScaleValue value, UErrorCode *status);
445
446 /* Conversion to 'universal time scale' */
447
459 U_STABLE int64_t U_EXPORT2
460 utmscale_fromInt64(int64_t otherTime, UDateTimeScale timeScale, UErrorCode *status);
461
462 /* Conversion from 'universal time scale' */
463
475 U_STABLE int64_t U_EXPORT2
476 utmscale_toInt64(int64_t universalTime, UDateTimeScale timeScale, UErrorCode *status);
477
478 #endif /* #if !UCONFIG_NO_FORMATTING */
479
480 #endif
481
UTSV_MIN_ROUND_VALUE
The constant used to select the minimum safe rounding value for a time scale.
Definition: utmscale.h:408
UDTS_DOTNET_DATE_TIME
Used in the .NET framework's System.DateTime structure.
Definition: utmscale.h:241
UDTS_JAVA_TIME
Used in the JDK.
Definition: utmscale.h:209
UDTS_MAC_OLD_TIME
Used in older Macintosh systems.
Definition: utmscale.h:249
UDTS_ICU4C_TIME
Used in IUC4C.
Definition: utmscale.h:225
UDateTimeScale
UDateTimeScale
UDateTimeScale values are used to specify the time scale used for conversion into or out if the unive...
Definition: utmscale.h:202
utmscale_getTimeScaleValue
int64_t utmscale_getTimeScaleValue(UDateTimeScale timeScale, UTimeScaleValue value, UErrorCode *status)
Get a value associated with a particular time scale.
utmscale_toInt64
int64_t utmscale_toInt64(int64_t universalTime, UDateTimeScale timeScale, UErrorCode *status)
Convert a datetime from the universal time scale to a int64_t in the given time scale.
UDTS_UNIX_MICROSECONDS_TIME
Data is a long.
Definition: utmscale.h:282
UDTS_EXCEL_TIME
Used in Excel.
Definition: utmscale.h:265
UTimeScaleValue
UTimeScaleValue
UTimeScaleValue values are used to specify the time scale values to utmscale_getTimeScaleValue.
Definition: utmscale.h:298
UDTS_MAC_TIME
Used in newer Macintosh systems.
Definition: utmscale.h:257
UDTS_UNIX_TIME
Used on Unix systems.
Definition: utmscale.h:217
UTSV_UNITS_ROUND_VALUE
The constant used to select the units round value for a time scale.
Definition: utmscale.h:396
UTSV_TO_MIN_VALUE
The constant used to select the minimum to value for a time scale.
Definition: utmscale.h:347
UDTS_MAX_SCALE
The first unused time scale value.
Definition: utmscale.h:287
UTSV_MAX_SCALE_VALUE
The number of time scale values, in other words limit of this enum.
Definition: utmscale.h:429
UTSV_FROM_MIN_VALUE
The constant used to select the minimum from value for a time scale.
Definition: utmscale.h:327
UTSV_EPOCH_OFFSET_PLUS_1_VALUE
The constant used to select the epoch plus one value for a time scale.
Definition: utmscale.h:371
UTSV_FROM_MAX_VALUE
The constant used to select the maximum from value for a time scale.
Definition: utmscale.h:337
UTSV_EPOCH_OFFSET_MINUS_1_VALUE
The constant used to select the epoch plus one value for a time scale.
Definition: utmscale.h:384
UTSV_TO_MAX_VALUE
The constant used to select the maximum to value for a time scale.
Definition: utmscale.h:357
UTSV_EPOCH_OFFSET_VALUE
The constant used to select the epoch offset value for a time scale.
Definition: utmscale.h:317
utmscale_fromInt64
int64_t utmscale_fromInt64(int64_t otherTime, UDateTimeScale timeScale, UErrorCode *status)
Convert a int64_t datetime from the given time scale to the universal time scale. ...
UErrorCode
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:476
UDTS_DB2_TIME
Used in DB2.
Definition: utmscale.h:273
UDTS_WINDOWS_FILE_TIME
Used in Windows for file times.
Definition: utmscale.h:233
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
UTSV_UNITS_VALUE
The constant used to select the units vale for a time scale.
Definition: utmscale.h:307
UTSV_MAX_ROUND_VALUE
The constant used to select the maximum safe rounding value for a time scale.
Definition: utmscale.h:420
U_STABLE
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition: umachine.h:109