Dates and Times
The primary class for representing an instance of time in Java is java.util.Date. Many of the methods in Date are deprecated and replaced by functionality contained in the java.util.Calendar and java.text.DateFormat classes. The .NET mechanism for representing an instant of time is the System.DateTime struct. Instances of DateTime are always associated with an instance of System.Calendar. This relationship allows DateTime to provide functionality equivalent to a combination of the Java Date and Calendar classes. Through implementation of the IFormattable interface, described in Chapter 7, and methods to parse string values, the .NET DateTime class includes functionality comparable to the Java DateFormat class.
A number of fundamental ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access