7 Working effectively with date and time data

This chapter covers

  • Thinking carefully about date and time information in specific concepts
  • Limiting the scope and documenting precise product requirements
  • Choosing the best libraries to use in your date and time code
  • Using date and time concepts consistently throughout your code and ensuring date and time code is testable
  • Choosing appropriate text formats for date and time data
  • Considering corner cases related to calendar arithmetic and time zones

Dates and times occur very naturally in almost all applications, even if it’s only in the timestamp of the application’s log messages. Unfortunately, they often cause significant problems, either with overcomplicated code or bugs that might only be seen ...

Get Software Mistakes and Tradeoffs now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.