Click here to Skip to main content

Date and Time

Great Reads

by Luc Pattyn
The code snippet below returns the first Thursday of a given year without iterating anything.DateTime FirstThursday(int year) { DateTime dt=new DateTime(year, 1, 1); return dt.AddDays((11-(int)dt.DayOfWeek)%7);}The formula used may seem a bit bizarre, it computes the distance...
by Nitesh Luharuka
How to Convert a Date Time to “X minutes ago” in C#
by John Atten
John on Google CodeProjectLet’s face it. Managing date information within the .net framework (or any framework, really . . . Java is not much better) is a pain the the ass. Really. What makes it even worse is managing user data entry of date information. If that isn’t bad enough, there i
by Tomer Shamam
Blendability Part I – Design time ViewModel

Latest Articles

by Ben M Watson
I was recently debugging a problem that just didn’t make any sense at first. The code looked like this: class App {     public bool IsRunning {get; set;}     private Thread houseKeepingThread;         public void Start()     {         this.IsRunning = true; this.houseKeepingThread = new Thread(Threa
by John Simmons / outlaw programmer
This is an alternative for "Partial DateTime Object Equality"
by Nikola Breznjak
Create a new 2D project: Optionally download some background image (I used this one) and drag it to the Assets folder: Drag the background image to the Hierarchy: Adjust the size of the Camera to 8: Hierarchy->Create->UI->Text: Click on Canvas in Hierarchy and set the Render mode: Click on Text a
by João Matos Silva
This project is a set of extensions to System.DateTime, including holidays and working days calculations on several culture locales

Discussions

by JasonDiplomat on technical blog "Get Your Thread...
by George Jonsson on tip/trick "Serialize System.TimeSpan to XML"
by Member 4755073 on tip/trick "Serialize System.TimeSpan to XML"
by Angelieri on Article "Time Period Library for .NET"
by Garth J Lancaster on article "Datetime Extensions"

All Articles