Liquid XML Data Binder (C++, Java, VB6) / Reference / Java / Reference / com.liquid_technologies.ltxmllib21 / Java DateTime
In This Topic
    Java DateTime
    In This Topic
    LtXmlLib21::DateTime Class
    A primitive type to a represent a date/time as defined by the XML w3c

    Base Classes:
    Implemented interfaces:
    Date and Time manipulation class provided as part of the Liquid XML Data Binding Runtime.

    Supports the W3C XML Schema specification subset of the ISO 8601 standard.
    The date uses the proleptic Gregorian calendar, this means that dates previous to the invent
    of the Gregorian calendar are still held as Gregorian dates.

    The Minimum Date represents -9999-12-31T23:59:59.999999999
    The Maximum Date represents 9999-12-31T23:59:59.999999999

    NOTE: DateTime uses the XML Schema formula for proleptic Gregorian calendar where year 0 is illegal and -4 (4BC) as a leap year.

    The Type of value held in the DateTime will differ depending on the way the DateTime is constructed. The Type
    value is immutable and is taken from the XML Schema subset of the ISO 8601 standard as follows:

    dateTime comprises [-]CCYY-MM-DDThh:mm:ss[.ff][[Z]|[[+|-]hh:mm]]
    date comprises [-]CCYY-MM-DD[[Z]|[[+|-]hh:mm]]
    gDay comprises ---DD[[Z]|[[+|-]hh:mm]]
    gMonth comprises --MM[[Z]|[[+|-]hh:mm]]
    gYear comprises [-]CCYY[[Z]|[[+|-]hh:mm]]
    gMonthDay comprises --MM-DD[[Z]|[[+|-]hh:mm]]
    gYearMonth comprises [-]CCYY-MM[[Z]|[[+|-]hh:mm]]
    time comprises hh:mm:ss[.ff][[Z]|[[+|-]hh:mm]]

    The parts in [...] are optional, everything else is mandatory where:

    '+', '-', ':', '.', 'T' and 'Z' = literal values
    CCYY = Year (-9999 <= CCYY <= 9999 && CCYY != 0000)
    MM = Month (01 <= MM <= 12)
    DD = Day (01 <= DD <= DaysInMonth)
    hh = Hour (00 <= hh <= 23)
    mm = Minute (00 <= mm <= 59)
    ss = Second (00 <= ss <= 59)
    ff = Fraction of Second (0 <= ff <= 999999999)

      Members Description  
        DateTime Constructor for DateTime  
        clone Creates a copy of the object  
        compareTo Compares this date with another DateTime  
        getCalendar Converts the DateTime object to a java.util.GregorianCalendar object  
        getCurrentTime Static Method, returns a DateTime with the current time.  
        getDayOfWeek Gets the Day of the Week  
        getDayOfYear Gets the Day of the Year  
        getDay Gets the Day part of the time  
        getHour Gets the Hour part of the time  
        getMicroSecond Gets the Micro-Second (10^-6) part of the time  
        getMilliSecond Gets the Milli-Second (10^-3) part of the time  
        getMinute Gets the Minute part of the time  
        getMonth Gets the Month part of the date. Jan = 1  
        getNanoSecond Gets the Nano-Second (10^-9) part of the time  
        getNormalized Creates a new DateTime that is a normalized copy of this DateTime  
        getRealSecond Gets the Second part of the time as a real number including Fraction parts.  
        getSecond Gets the Second part of the time  
        getType Gets the type of this DateTime  
        getYear Gets the Year part of the date  
        getZoneHour Gets the Hour part of the time zone.  
        getZoneMinute Gets the Minute part of the time  
        hasTimeZone Returns true if the TimeZone part of the DateTime is been used.  
        isUTC Returns true if the UTC part of the DateTime is been used.  
        equals Compares this DateTime to another DateTime  
        add Creates a new DateTime containing this DateTime + DateTimeSpan value  
        after Compares this DateTime with another DateTime  
        before Compares this DateTime with another DateTime  
        afterEquals Compares this DateTime with another DateTime  
        beforeEquals Compares this DateTime with another DateTime  
        decreaseBy Subtrats DateTimeSpan value to this DateTime  
        increaseBy Adds DateTimeSpan value to this DateTime  
        parseXSDDate Populates this DateTime with the value specified as a valid XML Schema date, gDay, gMonth, gYear, gMonthDay or gYearMonth.  
        parseXSDDateTime Populates this DateTime with the value specified as a valid XML Schema dateTime.  
        parseXSDTime Populates this DateTime with the value specified as a valid XML Schema time.  
        setDate Populates this DateTime as type date.  
        setDateTime Populates this DateTime as type dateTime.  
        setFracTime Populates this DateTime as type time.  
        setGDay Populates this DateTime as type gDay.  
        setGMonth Populates this DateTime as type gMonth  
        setGMonthDay Populates this DateTime as type gMonthDay  
        setGYearMonth Populates this DateTime as type gYearMonth.  
        setGYear Populates this DateTime as type gYear.  
        setTime Populates this DateTime as type time.  
        setTimeZone Specifies the TimeZone for this DateTime to use.  
        setUTC Specifies this DateTime is UTC.  
        toString Returns a std::string representation of this DateTime.