DateUtil

org.abh80.nf.util.DateUtil
object DateUtil

Utility object for date formatting and manipulation.

Provides various date formats. If you want American standard (MM/DD/YYYY), use ANSI_INCITS_30_1997. If you want ISO standard (YYYY-MM-DD), use ISO8601. If you want Asian style (YYYY.MM.DD), use ASIAN. If you want European style (DD/MM/YYYY), use EN28601. RFC822 is for email headers and similar.

Attributes

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

Members list

Type members

Classlikes

final case class ANSI_INCITS_30_1997(dd: Int, mm: Int, yyyy: Int) extends StringDateFormat

ANSI INCITS 30-1997 format (MM/DD/YYYY). If you want American standard, use this.

ANSI INCITS 30-1997 format (MM/DD/YYYY). If you want American standard, use this.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class ASIAN(dd: Int, mm: Int, yyyy: Int) extends StringDateFormat

Asian format (YYYY.MM.DD). If you want Asian style, use this.

Asian format (YYYY.MM.DD). If you want Asian style, use this.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
sealed trait DateName

Trait for date names (months, weekdays).

Trait for date names (months, weekdays).

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
enum Month
enum Weekday
object DateSeparator

Common date separators.

Common date separators.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
final case class EN28601(dd: Int, mm: Int, yyyy: Int) extends StringDateFormat

EN 28601 format (DD/MM/YYYY). If you want European standard, use this.

EN 28601 format (DD/MM/YYYY). If you want European standard, use this.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class ISO8601(dd: Int, mm: Int, yyyy: Int) extends StringDateFormat

ISO 8601 format (YYYY-MM-DD). Use this for international standard.

ISO 8601 format (YYYY-MM-DD). Use this for international standard.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
enum Month(val asInt: Int) extends DateName

Enumeration for months. Use Month.getMonth to convert from integer.

Enumeration for months. Use Month.getMonth to convert from integer.

Attributes

Companion
object
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
trait DateName
class Object
trait Matchable
class Any
Show all
object Month

Utilities for working with months.

Utilities for working with months.

Attributes

Companion
enum
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Month.type
final case class RFC822(dd: Int, mm: Int, yyyy: Int, weekDay: Int) extends StringDateFormat

RFC822 format (e.g., "Mon, 01 Jan 2024"). Use this for email headers and similar.

RFC822 format (e.g., "Mon, 01 Jan 2024"). Use this for email headers and similar.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
sealed trait StringDateFormat(dd: Int, mm: Int, yyyy: Int)

Base trait for date formats represented as strings.

Base trait for date formats represented as strings.

Value parameters

dd

Day

mm

Month

yyyy

Year

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class ASIAN
class EN28601
class ISO8601
class RFC822
case object WeekUtil

Utilities for working with weekdays.

Utilities for working with weekdays.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
WeekUtil.type
enum Weekday(asInt: Int) extends DateName

Enumeration for weekdays. Use WeekUtil for conversions and checks.

Enumeration for weekdays. Use WeekUtil for conversions and checks.

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
trait DateName
class Object
trait Matchable
class Any
Show all

Types

type DateSeparator = String

Type alias for a date separator string.

Type alias for a date separator string.

Attributes