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

You Might Also Like
Our Free Plans just got better! | Auth0 by Okta Icon
Our Free Plans just got better! | Auth0 by Okta

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your secuirty. Auth0 now, thank yourself later.
Try free now
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