DateTimeExtension extension

on

Properties

horaFinal → DateTime

Available on DateTime, provided by the DateTimeExtension extension

Retorna um DateTime com o mesmo ano, mês e dia. Porém, com a hora configurada às 23:59:59
no setter
horaInicial → DateTime

Available on DateTime, provided by the DateTimeExtension extension

Remove informação de hora, minuto, segundo e milisegundo Retorna o mesmo DateTime com somente ano, mês e dia
no setter
isDatePast → bool

Available on DateTime, provided by the DateTimeExtension extension

no setter
truncateFuture → DateTime

Available on DateTime, provided by the DateTimeExtension extension

Retorna o mesmo this se estiver numa data passada. Retorna DateTime.now() se this for uma data futura. Cálculo não considera informações de hora, minuto e segundo.
no setter

Methods

equalDate(DateTime other) → bool

Available on DateTime, provided by the DateTimeExtension extension

Compara igualdade entre dois DateTime desconsiderando tempo
equalTime(DateTime other, [bool includeSeconds = true]) → bool

Available on DateTime, provided by the DateTimeExtension extension

Compara igualdade entre dois DateTime desconsiderando data. É possível configurar para considerar segundos.
formattedDate([String separator = '/']) → String

Available on DateTime, provided by the DateTimeExtension extension

Retorna String com data formatada. É possível configurar o caractere separador.
formattedDateTime([bool includeSeconds = false, String dateSeparator = '/', String timeSeparator = ':']) → String

Available on DateTime, provided by the DateTimeExtension extension

Retorna String com data e tempo formatados. É possível configurar o caractere separador de cada uma das informações. É possível configurar se tempo deve incluir segundos.
formattedTime([bool includeSeconds = true, String separator = ':']) → String

Available on DateTime, provided by the DateTimeExtension extension

Retorna String com tempo formatado. É possível configurar o caractere separador. É possível configurar se deve incluir segundos.