## Uses of Class
com.comtrade.ecm.engine.datatypes.DateTime

- Packages that use DateTime
  Package | Description
  --- | ---
  com.comtrade.ecm.engine.datatypes | Additional DataTypes. All of them must implement `DataType` interface.

- - ### Uses of DateTime in com.comtrade.ecm.engine.datatypes

    Methods in com.comtrade.ecm.engine.datatypes that return DateTime
    Modifier and Type | Method and Description
    --- | ---
    `DateTime` | DateTime.`add(long amountToAdd, DateTime.Unit unit)` Changes a current value of an object for `amountToAdd` units of `unit`
    `static DateTime` | DateTime.`now()` Creating a datetime from a current date and current time.
    `static DateTime` | DateTime.`of(Date date)` Creating a datetime from a `Date`.
    `static DateTime` | DateTime.`of(java.util.Date datetime)` Creating a datetime from a `Date`.
    `static DateTime` | DateTime.`of(DateTime datetime)` Creating a datetime from another `DateTime`.
    `static DateTime` | DateTime.`of(Date date, Time time)` Creating a datetime from a `Date` and a `Time`
    `static DateTime` | DateTime.`of(java.time.LocalDate date)` Creating a datetime from a `LocalDate`.
    `static DateTime` | DateTime.`of(java.time.LocalDateTime datetime)` Creating a datetime from a `DateTime`
    `DateTime` | DateTime.`toEndOfDay()`
    `DateTime` | DateTime.`toEndOfYear()`
    `DateTime` | DateTime.`toStartOfDay()`
    `DateTime` | DateTime.`toStartOfYear()`

    Methods in com.comtrade.ecm.engine.datatypes with parameters of type DateTime
    Modifier and Type | Method and Description
    --- | ---
    `int` | DateTime.`compareTo(DateTime other)` Compares an object with another `DateTime`-object.
    `int` | Date.`compareTo(DateTime other)` Compares an object with another `DateTime` object.
    `boolean` | Date.`isSameDateAs(DateTime otherDateTime)` Compares an object to another `DateTime`-object. The method name is INTENTIONALLY chosen NOT TO BE `equals` in order to prevent a possible mix-up. `Date` and `DateTime` will be treated as "of same date" if they are equal on year/month/dayOfMonth level
    `static DateTime` | DateTime.`of(DateTime datetime)` Creating a datetime from another `DateTime`.
    `static Date` | Date.`of(DateTime dateTime)` Creating a date from a `DateTime`
    `static java.lang.String` | DateTime.`toString(DateTime dateTime, java.time.format.DateTimeFormatter formatter)` Converts `dateTime` to `String`, using `formatter`, following all other rules of formatting.
    `static java.lang.String` | DateTime.`toString(DateTime dateTime, java.util.Locale locale)` Converts `dateTime` to `String`, using `locale`, following all other rules of formatting.
    `static java.lang.String` | DateTime.`toString(DateTime dateTime, java.lang.String formatDescription)` Converts `dateTime` to `String`, using `formatDescription`, following all other rules of formatting.