DateTools was written to streamline date and time handling in iOS. Classes and concepts from other languages served as an inspiration for DateTools, especially the DateTime structure and Time Period Library for .NET. Through these classes and others, DateTools removes the boilerplate required to access date components, handles more nuanced date comparisons, and serves as the foundation for entirely new concepts like Time Periods and their collections. All the classes required for DateTools are located in the DateTools folder in the root of this repository. DateTools.h contains the headers for all the other files. Import this if you want to link to the entire framework. One of the missions of DateTools was to make Date feel more complete. There are many other languages that allow direct access to information about dates from their date classes, but Date (sadly) does not.

Features

  • The date editing methods in DateTools makes it easy to shift a date earlier or later by adding and subtracting date components
  • Another mission of the DateTools category is to greatly increase the flexibility of date comparisons
  • The new methods are isEarlierThan, isEarlierThanOrEqualTo, isLaterThan, and isLaterThanOrEqualTo
  • Date comes with two methods timeIntervalSinceDate: and timeIntervalSinceNow which gives you a double offset representing the number of seconds between the two dates
  • DateTools goes back to the ever-trusty NSCalendar and abstracts out all the necessary code for you
  • DateTools has a few convenience methods for quickly creating strings from dates

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow DateTools

DateTools Web Site

Other Useful Business Software
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of DateTools!

Additional Project Details

Operating Systems

Apple iPhone

Programming Language

Objective C

Related Categories

Objective C Time Tracking Software, Objective C Libraries

Registered

2021-08-02