Time & Date
Articles related to time and date topics.
General Programming »
Time & Date
General
General topics relating to time and dates.
A Friendly DateTime Formatter
Many websites have the ability show a date and time formatted as "2 minutes ago", "1 hour ago", or "Yesterday at 2:30P". Here's a class I wrote to format dates and times this way. It even supports dates and times in the future.
By Jonathan Wood on Friday, March 25, 2011
Creating a User-Friendly TimeSpan String
The .NET TimeSpan class is great for keeping track of the difference between two instances of DateTime. However, while TimeSpan has a lot of formatting options, none of them produce a very user-friendly result. Here's a class I wrote to produce a much friendly description from a TimeSpan.
By Jonathan Wood on Tuesday, October 09, 2012
Timers
Articles related to timing events and timers.
C++ High-Resolution Timer
This simple class uses the highest-resolution timer available under Windows. It's perfect for finding bottlenecks in your code or for simply comparing different computer tasks.
By Jonathan Wood on Wednesday, December 22, 2010