trait DateMatcherUtils extends Params
- Grouped
- Alphabetic
- By Inheritance
- DateMatcherUtils
- Params
- Serializable
- Serializable
- Identifiable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
getParam
- def getAnchorDateDay: Int
- def getAnchorDateMonth: Int
- def getAnchorDateYear: Int
- def getDefaultDayWhenMissing: Int
- def getInputFormats: Array[String]
- def getOutputFormat: String
- def getReadMonthFirst: Boolean
-
def
getSourceLanguage: String
To get to use or not the multi-language translation.
param
-
val
aggressiveMatching: BooleanParam
Whether to aggressively attempt to find date matches, even in ambiguous or less common formats (Default:
false
) -
val
anchorDateDay: Param[Int]
Add an anchor day for the relative dates such as a day after tomorrow (Default:
-1
).Add an anchor day for the relative dates such as a day after tomorrow (Default:
-1
). By default it will use the current day. The first day of the month has value 1. -
val
anchorDateMonth: Param[Int]
Add an anchor month for the relative dates such as a day after tomorrow (Default:
-1
).Add an anchor month for the relative dates such as a day after tomorrow (Default:
-1
). By default it will use the current month. Month values start from1
, so1
stands for January. -
val
anchorDateYear: Param[Int]
Add an anchor year for the relative dates such as a day after tomorrow (Default:
-1
).Add an anchor year for the relative dates such as a day after tomorrow (Default:
-1
). If it is not set, the by default it will use the current year. Example: 2021 -
val
defaultDayWhenMissing: IntParam
Which day to set when it is missing from parsed input (Default:
1
) -
def
getAggressiveMatching: Boolean
To get aggressive matching Strategy
-
def
getRelaxedFactoryStrategy: String
To get matched strategy to search relaxed dates by ordered rules by more exhaustive to less Strategy
-
val
inputFormats: StringArrayParam
Date Matcher regex patterns.
-
val
outputFormat: Param[String]
Output format of parsed date (Default:
"yyyy/MM/dd"
) -
val
readMonthFirst: BooleanParam
Whether to interpret dates as MM/DD/YYYY instead of DD/MM/YYYY (Default:
true
) -
val
relaxedFactoryStrategy: Param[String]
Matched strategy to search relaxed dates by ordered rules by more exhaustive to less Strategy
-
def
setAggressiveMatching(value: Boolean): DateMatcherUtils.this.type
To set aggressive matching Strategy
-
def
setRelaxedFactoryStrategy(matchStrategy: Format = MatchStrategy.MATCH_FIRST): DateMatcherUtils.this.type
To set matched strategy to search relaxed dates by ordered rules by more exhaustive to less Strategy
-
val
sourceLanguage: Param[String]
Source language for explicit translation
setParam
- def setAnchorDateDay(value: Int): DateMatcherUtils.this.type
- def setAnchorDateMonth(value: Int): DateMatcherUtils.this.type
- def setAnchorDateYear(value: Int): DateMatcherUtils.this.type
- def setDefaultDayWhenMissing(value: Int): DateMatcherUtils.this.type
- def setInputFormats(value: Array[String]): DateMatcherUtils.this.type
- def setOutputFormat(value: String): DateMatcherUtils.this.type
- def setReadMonthFirst(value: Boolean): DateMatcherUtils.this.type
-
def
setSourceLanguage(value: String): DateMatcherUtils.this.type
To set or not the source language for explicit translation.
Ungrouped
-
abstract
def
copy(extra: ParamMap): Params
- Definition Classes
- Params
-
abstract
val
uid: String
- Definition Classes
- Identifiable
-
final
def
clear(param: Param[_]): DateMatcherUtils.this.type
- Definition Classes
- Params
-
def
explainParam(param: Param[_]): String
- Definition Classes
- Params
-
def
explainParams(): String
- Definition Classes
- Params
-
final
def
extractParamMap(): ParamMap
- Definition Classes
- Params
-
final
def
extractParamMap(extra: ParamMap): ParamMap
- Definition Classes
- Params
-
final
def
get[T](param: Param[T]): Option[T]
- Definition Classes
- Params
-
final
def
getDefault[T](param: Param[T]): Option[T]
- Definition Classes
- Params
-
final
def
getOrDefault[T](param: Param[T]): T
- Definition Classes
- Params
-
def
getParam(paramName: String): Param[Any]
- Definition Classes
- Params
-
final
def
hasDefault[T](param: Param[T]): Boolean
- Definition Classes
- Params
-
def
hasParam(paramName: String): Boolean
- Definition Classes
- Params
-
final
def
isDefined(param: Param[_]): Boolean
- Definition Classes
- Params
-
final
def
isSet(param: Param[_]): Boolean
- Definition Classes
- Params
-
lazy val
params: Array[Param[_]]
- Definition Classes
- Params
- def relativeExactContentParse(possibleDate: RuleMatch): MatchedDateTime
- val relativeFuturePattern: String
-
val
relativePastPattern: String
Used for past relative date matches
-
final
def
set[T](param: Param[T], value: T): DateMatcherUtils.this.type
- Definition Classes
- Params
-
def
toString(): String
- Definition Classes
- Identifiable → AnyRef → Any
- def tomorrowYesterdayContentParse(date: RuleMatch): MatchedDateTime