Returns a DateTime that is set to the specified date and time in the specified era.
- year
An integer that represents the year.
- month
An integer from 1 to 13 that represents the month.
- day
An integer from 1 to 30 that represents the day.
- hour
An integer from 0 to 23 that represents the hour.
- minute
An integer from 0 to 59 that represents the minute.
- second
An integer from 0 to 59 that represents the second.
- millisecond
An integer from 0 to 999 that represents the millisecond.
- era
An integer that represents the era. Specify either HebrewCalendar.HebrewEra or HebrewCalendar.Eras[Calendar.CurrentEra].
![]()
The DateTime that is set to the specified date and time in the current era.
The HebrewCalendar.ToDateTime(int, int, int, int, int, int, int, int) method is useful because it can convert any date in the current calendar to a Gregorian calendar date. The Gregorian date can subsequently be used, for example, to compare dates in different calendars or create an equivalent date in a particular calendar.
This implementation of the System.Globalization.HebrewCalendar class recognizes only the Hebrew years 5343 to 5999 (1583 to 2239 in the Gregorian calendar).