DateTime型のコンストラクタに渡されたCalendarオブジェクトの正しい動作は何ですか? Hijriとグレゴリオ暦のDateTimeコンストラクタ
私は、以下の例のような構成要素の年、月、日を持っている:day = 1
month = 5
year = 1433 (which is the current Hijri year)
使用しながら、結果が有効グレッグ日
HijriCalendar hijri = new HijriCalendar();
//Get the First Day in the Month
DateTime firstDayInMonth = new DateTime(1433, month, 1, hijri);
で以下のコードを使用してDateTimeオブジェクトを作成します以下のコードは有効なHijri日付を生成します:
GregorianCalendar greg = new GregorianCalendar();
//Get the First Day in the Month
DateTime firstDayInMonth = new DateTime(1433, month, 1, greg);
は正しいresウルトラ?
特定の日付が両方のカレンダーにあることを確認すると、問題は何ですか? – Oded
あなたはHijriをグレゴリオ暦に変換しようとしていますか?あなたがHijri年1433に入った場合、2011年のグレゴリオ暦は得られますか? – ChrisBD
@ChrisBD:はいヒジリと見なされるコンポーネントを渡してグレゴリオ暦の日付を取得したいとします。 – SShebly