Skip to main content

date-validators

ai-research-agent / extractor/html-to-cite/extract-date/date-validators

Functions

check_date_input()

function check_date_input(date_object, default_date): any

Parameters

ParameterType

date_object

any

default_date

any

Returns

any


check_extracted_reference()

function check_extracted_reference(reference, options): null | string

Parameters

ParameterType

reference

any

options

any

Returns

null | string


compare_values()

function compare_values(
reference,
attempt,
options): any

Parameters

ParameterType

reference

any

attempt

any

options

any

Returns

any


convert_date()

function convert_date(
datestring,
inputformat,
outputformat): any

Parameters

ParameterType

datestring

any

inputformat

any

outputformat

any

Returns

any


filter_ymd_candidate()

function filter_ymd_candidate(
bestmatch,
pattern,
original_date,
copyear,
outputformat,
min_date,
max_date): any

Parameters

ParameterType

bestmatch

any

pattern

any

original_date

any

copyear

any

outputformat

any

min_date

any

max_date

any

Returns

any


get_max_date()

function get_max_date(max_date): any

Parameters

ParameterType

max_date

any

Returns

any


get_min_date()

function get_min_date(min_date): any

Parameters

ParameterType

min_date

any

Returns

any


is_valid_date()

function is_valid_date(
date_input,
outputformat,
earliest,
latest): boolean

Parameters

ParameterType

date_input

any

outputformat

any

earliest

any

latest

any

Returns

boolean


is_valid_format()

function is_valid_format(outputformat): boolean

Parameters

ParameterType

outputformat

any

Returns

boolean


plausible_year_filter()

function plausible_year_filter(
htmlstring,
pattern,
yearpat,
earliest,
latest,
incomplete): Map<any, any>

Parameters

ParameterTypeDefault value

htmlstring

any

undefined

pattern

any

undefined

yearpat

any

undefined

earliest

any

undefined

latest

any

undefined

incomplete

boolean

false

Returns

Map<any, any>