Class DateTime

java.lang.Object
org.drip.analytics.date.DateTime

public class DateTime
extends java.lang.Object
DateTime provides the representation of the instantiation-time date and time objects. It provides the following functionality:

  • Instantiation-time and Explicit Date/Time Construction
  • Retrieval of Date/Time Fields
  • Serialization/De-serialization to and from Byte Arrays


The References are:
  • Fliegel, H. F., and T. C. van Flandern (1968): A Machine Algorithm for Processing Calendar Dates Communications of the ACM 11 657
  • Fenton, D. (2001): Julian to Calendar Date Conversion http://mathforum.org/library/drmath/view/51907.html


Author:
Lakshmi Krishnamurthy
  • Constructor Summary

    Constructors
    Constructor Description
    DateTime()
    Default constructor initializes the time and date to the current time and current date.
    DateTime​(double dblDate, long lTime)
    Constructs DateTime from separate date and time inputs
  • Method Summary

    Modifier and Type Method Description
    double date()
    Retrieve the Date
    long time()
    Retrieve the time

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DateTime

      public DateTime() throws java.lang.Exception
      Default constructor initializes the time and date to the current time and current date.
      Throws:
      java.lang.Exception - Thrown if the DateTime Instance cannot be created
    • DateTime

      public DateTime​(double dblDate, long lTime) throws java.lang.Exception
      Constructs DateTime from separate date and time inputs
      Parameters:
      dblDate - Date
      lTime - Time
      Throws:
      java.lang.Exception - Thrown on Invalid Inputs
  • Method Details

    • date

      public double date()
      Retrieve the Date
      Returns:
      date
    • time

      public long time()
      Retrieve the time
      Returns:
      time