extract-date
ai-research-agent / extractor/html-to-cite/extract-date/extract-date
Functions
extractDate()
function extractDate(
htmlobject,
extensive_search?,
original_date?,
outputformat?,
url?,
verbose?,
min_date?,
max_date?,
deferred_url_extractor?): null | string
Extract date from document using various methods
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
|
|
| DOM object with article content |
|
|
| perform extensive search if true |
|
|
| return original date if true |
|
|
| output format |
|
|
| URL of the page |
|
|
| log debug messages if true |
|
|
| minimum date to consider |
|
|
| maximum date to consider |
|
|
| if true, do not extract date from URL |
Returns
null
| string
Extracted date or null if not found
Author
ai-research-agent (2024) Based on Barbaresi (2020)
Variables
CLASS_ATTRS
const CLASS_ATTRS: Set<string>;
DATE_ATTRIBUTES
const DATE_ATTRIBUTES: Set<string>;
ITEMPROP_ATTRS
const ITEMPROP_ATTRS: Set<string>;
ITEMPROP_ATTRS_MODIFIED
const ITEMPROP_ATTRS_MODIFIED: Set<string>;
ITEMPROP_ATTRS_ORIGINAL
const ITEMPROP_ATTRS_ORIGINAL: Set<string>;
NAME_MODIFIED
const NAME_MODIFIED: Set<string>;
NON_DIGITS_REGEX
const NON_DIGITS_REGEX: RegExp;
PROPERTY_MODIFIED
const PROPERTY_MODIFIED: Set<string>;