Dates

org.beangle.commons.lang.Dates
object Dates

Dates class.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Dates.type

Members list

Value members

Concrete methods

def nomalizeYearMonth(ym: String): String

Change YearMonth Format

Change YearMonth Format

  • YYYY.M into YYYY-0M
  • YYYY.MM into YYYY-MM
  • YYYY-M into YYYY-0M

Attributes

def normalizeDate(str: String): String

normalize. change other formats to uniform one.

normalize. change other formats to uniform one.

YYYYMMDD => YYYY-MM-DD YYYY-M-D => YYYY-MM-DD YYYY.MM.dd =>YYYY-MM-DD

Value parameters

dateStr

a String object.

Attributes

Returns

a String object.

def normalizeDateTime(value: String): String

Change DateTime Format

Change DateTime Format

  • YYYY-MM-DD HH:mm into YYYY-MM-DDTHH:mm:00
  • YYYY-MM-DD HH:mm:ss into YYYY-MM-DDTHH:mm:ss

Attributes

def normalizeMonthDay(md: String): String
def now: LocalDateTime
def toDate(value: String): LocalDate
def toDateTime(value: String): LocalDateTime
def toHourMinute(value: String): HourMinute
def toInstant(value: String): Instant
def toMonthDay(value: String): MonthDay
def toOffsetateTime(value: String): OffsetDateTime
def toTime(value: String): LocalTime
def toYearMonth(value: String): YearMonth
def toZonedDateTime(value: String): ZonedDateTime
def today: LocalDate