UmAlQuraCalendar.ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32) Método

Definição

Retorna um DateTime que é definido para a data, hora e era especificadas.Returns a DateTime that is set to the specified date, time, and era.

public:
 override DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era);
public override DateTime ToDateTime (int year, int month, int day, int hour, int minute, int second, int millisecond, int era);
override this.ToDateTime : int * int * int * int * int * int * int * int -> DateTime
Public Overrides Function ToDateTime (year As Integer, month As Integer, day As Integer, hour As Integer, minute As Integer, second As Integer, millisecond As Integer, era As Integer) As DateTime

Parâmetros

year
Int32

Um ano.A year.

month
Int32

Um inteiro de 1 a 12 que representa um mês.An integer from 1 through 12 that represents a month.

day
Int32

Um inteiro de 1 a 29 que representa um dia.An integer from 1 through 29 that represents a day.

hour
Int32

Um inteiro de 0 a 23 que representa uma hora.An integer from 0 through 23 that represents an hour.

minute
Int32

Um inteiro de 0 a 59 que representa um minuto.An integer from 0 through 59 that represents a minute.

second
Int32

Um inteiro de 0 a 59 que representa um segundo.An integer from 0 through 59 that represents a second.

millisecond
Int32

Um inteiro de 0 a 999 que representa um milissegundo.An integer from 0 through 999 that represents a millisecond.

era
Int32

Uma era.An era. Especifique UmAlQuraCalendar.Eras[UmAlQuraCalendar.CurrentEra] ou UmAlQuraEra.Specify UmAlQuraCalendar.Eras[UmAlQuraCalendar.CurrentEra] or UmAlQuraEra.

Retornos

DateTime

O DateTime que é definido como a data e hora especificadas na era atual.The DateTime that is set to the specified date and time in the current era.

Exceções

year, month, day ou era está fora do intervalo com suporte da classe UmAlQuraCalendar.year, month, day, or era is outside the range supported by the UmAlQuraCalendar class.

- ou --or- hour é menor que zero ou maior que 23.hour is less than zero or greater than 23.

- ou --or- minute é menor que zero ou maior que 59.minute is less than zero or greater than 59.

- ou --or- second é menor que zero ou maior que 59.second is less than zero or greater than 59.

- ou --or- millisecond é menor que zero ou maior que 999.millisecond is less than zero or greater than 999.

Comentários

O ToDateTime método é útil porque pode converter qualquer data no calendário atual em uma data do calendário gregoriano.The ToDateTime method is useful because it can convert any date in the current calendar to a Gregorian calendar date. A data gregoriana pode ser usada posteriormente, por exemplo, para comparar datas em diferentes calendários ou criar uma data equivalente em um calendário específico.The Gregorian date can subsequently be used, for example, to compare dates in different calendars or create an equivalent date in a particular calendar.

Aplica-se a