DateTimeHelper

uk.gov.hmrc.apiplatform.modules.common.services.DateTimeHelper

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Extensions

Extensions

extension (localDate: LocalDate)
def asInstant: Instant

Converts a LocalDate to an Instant, assuming the LD was created in the UTC time zone.

Converts a LocalDate to an Instant, assuming the LD was created in the UTC time zone.

Attributes

extension (me: LocalDateTime)
def asInstant: Instant

Converts a LocalDateTime to an Instant, assuming the LDT was created in the UTC time zone.

Converts a LocalDateTime to an Instant, assuming the LDT was created in the UTC time zone.

Attributes

def truncate(): LocalDateTime
extension (me: Instant)
def asLocalDate: LocalDate

Converts an Instant to a LocalDate, assuming "local" is in the UTC time zone. Note: truncates the time

Converts an Instant to a LocalDate, assuming "local" is in the UTC time zone. Note: truncates the time

Attributes

def asLocalDateTime: LocalDateTime

Converts an Instant to a LocalDateTime, assuming "local" is in the UTC time zone.

Converts an Instant to a LocalDateTime, assuming "local" is in the UTC time zone.

Attributes

def truncate(): Instant