Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Exemple d’utilisation du calendrier Hijri(musulman)


{filelink=19641}

using System;
using System.Globalization;
 
public class CalendrierHijir
{
 
   public static void Main()
   {
 
        // Créer une date de Calendrier Hijir(Islamique)
        HijriCalendar hijri = new HijriCalendar();
        Console.WriteLine(hijri.GetDayOfMonth(new DateTime(1430, 1, 1, hijri)) + "/" +
        hijri.GetMonth(new DateTime(1430, 1, 1, hijri)) + "/" + hijri.GetYear(new DateTime(1430, 1, 1, hijri)));
        DateTime dateHijri = new DateTime(1430, 1, 1, hijri);
        // Afficher les dates correspondantes.
        Console.WriteLine(dateHijri.Day);
        Console.WriteLine(dateHijri.Month);
        Console.WriteLine(dateHijri.Year); 
 
        // Afficher la date hijri.
        Console.WriteLine(hijri.GetDayOfMonth(DateTime.Now) + "/" + hijri.GetMonth(DateTime.Now)
            + "/" + hijri.GetYear(DateTime.Now));
   }
}

No comments yet.

Leave a Comment