O'Reilly logo

C# for Java Developers by Adam Freeman, Allen Jones

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required