Package org.apache.ignite.internal.cache.query.index.sorted.inline.types

## Class DateValueUtils

- java.lang.Object
- - org.apache.ignite.internal.cache.query.index.sorted.inline.types.DateValueUtils

    public class DateValueUtils
    extends Object

DateValue is a representation of a date in bit form: dv = (year << SHIFT_YEAR) | (month << SHIFT_MONTH) | day.

### Field Summary

Fields
`static long` `MAX_DATE_VALUE` Max date value.
`static long` `MILLIS_PER_DAY` The number of milliseconds per day.
`static long` `MIN_DATE_VALUE` Min date value.
`static long` `NANOS_PER_DAY` The number of nanoseconds per day.

### Method Summary

All Methods Static Methods Concrete Methods
`static Date` `convertToSqlDate​(LocalDate locDate)`
`static Time` `convertToSqlTime​(LocalTime locTime)`
`static Timestamp` `convertToTimestamp​(LocalDateTime locDateTime)`
`static long` `dateValue​(int year, int month, int day)` Construct date value from components.
`static long` `dateValueFromMillis​(long millis)` Convert epoch milliseconds to date value.
`static long` `defaultTzMillisFromUtc​(long utcMillis)` Convert millis in UTC to default time zone millis.
`static long` `millisFromDateValue​(long dateVal)` Convert date value to epoch milliseconds.
`static long` `utcMillisFromDefaultTz​(long tzMillis)` Convert millis in default time zone to UTC millis.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### MIN_DATE_VALUE

    public static final long MIN_DATE_VALUE

Min date value.

See Also:
  Constant Field Values

#### MAX_DATE_VALUE

    public static final long MAX_DATE_VALUE

Max date value.

See Also:
  Constant Field Values

#### MILLIS_PER_DAY

    public static final long MILLIS_PER_DAY

The number of milliseconds per day.

See Also:
  Constant Field Values

#### NANOS_PER_DAY

    public static final long NANOS_PER_DAY

The number of nanoseconds per day.

See Also:
  Constant Field Values

### Method Detail

#### dateValue

    public static long dateValue​(int year,
                                 int month,
                                 int day)

Construct date value from components.

#### millisFromDateValue

    public static long millisFromDateValue​(long dateVal)

Convert date value to epoch milliseconds.

#### dateValueFromMillis

    public static long dateValueFromMillis​(long millis)

Convert epoch milliseconds to date value.

#### utcMillisFromDefaultTz

    public static long utcMillisFromDefaultTz​(long tzMillis)

Convert millis in default time zone to UTC millis.

#### defaultTzMillisFromUtc

    public static long defaultTzMillisFromUtc​(long utcMillis)

Convert millis in UTC to default time zone millis.

#### convertToTimestamp

    public static Timestamp convertToTimestamp​(LocalDateTime locDateTime)

#### convertToSqlTime

    public static Time convertToSqlTime​(LocalTime locTime)

#### convertToSqlDate

    public static Date convertToSqlDate​(LocalDate locDate)