Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 16. An OOP Primer > The DateTime Class

The DateTime Class

Added in version 5.2 of the language is the DateTime class. An alternative to the date-and time-related functions introduced in Chapter 11, “Web Application Development,” the DateTime class packages together all the functionality you might need for manipulating dates and times. It’s especially useful for converting and comparing dates and times.

To begin, create a new DateTime object:


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint