Click here to Skip to main content
15,885,953 members
Articles / Programming Languages / C# 4.0

Persian DateTime

Rate me:
Please Sign up or sign in to vote.
3.47/5 (25 votes)
25 Apr 2011CPOL 98.8K   8.2K   31  
A structure like System.DateTime which is designed to support Persian calendar
using System.Runtime.InteropServices;

namespace Library.Globalization
{
    [StructLayout(LayoutKind.Sequential)]
    internal struct PersianDateTimeData
    {
        internal int Year;
        internal int Month;
        internal int Day;
        internal int Hour;
        internal int Minute;
        internal int Second;

        internal bool HasDate;
        internal bool HasTime;

        internal void Init()
        {
            this.Year = this.Month = this.Day = this.Hour = this.Minute = this.Second = -1;
            this.HasDate = true;
            this.HasTime = true;
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect Iran
Iran (Islamic Republic of) Iran (Islamic Republic of)
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions