chrono-node
- Version 2.9.0
- Published
- 3.16 MB
- No dependencies
- MIT license
Install
npm i chrono-nodeyarn add chrono-nodepnpm add chrono-nodeOverview
A natural language date parser in Javascript
Index
Variables
Functions
Classes
Interfaces
Enums
Type Aliases
Namespaces
Variables
Functions
Classes
class Chrono
class Chrono {}constructor
constructor(configuration?: Configuration);property defaultConfig
defaultConfig: ENDefaultConfiguration;property parsers
parsers: Parser[];property refiners
refiners: Refiner[];method clone
clone: () => Chrono;method parse
parse: ( text: string, referenceDate?: ParsingReference | Date, option?: ParsingOption) => ParsedResult[];method parseDate
parseDate: ( text: string, referenceDate?: ParsingReference | Date, option?: ParsingOption) => Date | null;class ParsingComponents
class ParsingComponents implements ParsedComponents {}constructor
constructor( reference: ReferenceWithTimezone, knownComponents?: { year?: number; month?: number; day?: number; weekday?: number; hour?: number; minute?: number; second?: number; millisecond?: number; meridiem?: number; timezoneOffset?: number; });method addDurationAsImplied
addDurationAsImplied: (duration: Duration) => ParsingComponents;method addTag
addTag: (tag: string) => ParsingComponents;method addTags
addTags: (tags: string[] | Set<string>) => ParsingComponents;method assign
assign: (component: Component, value: number) => ParsingComponents;method clone
clone: () => ParsingComponents;method createRelativeFromReference
static createRelativeFromReference: ( reference: ReferenceWithTimezone, duration?: Duration) => ParsingComponents;method date
date: () => Date;method delete
delete: (components: Component | Component[]) => void;method get
get: (component: Component) => number | null;method getCertainComponents
getCertainComponents: () => Array<Component>;method imply
imply: (component: Component, value: number) => ParsingComponents;method isCertain
isCertain: (component: Component) => boolean;method isDateWithUnknownYear
isDateWithUnknownYear: () => boolean;method isOnlyDate
isOnlyDate: () => boolean;method isOnlyTime
isOnlyTime: () => boolean;method isOnlyWeekdayComponent
isOnlyWeekdayComponent: () => boolean;method isValidDate
isValidDate: () => boolean;method tags
tags: () => Set<string>;method toString
toString: () => string;class ParsingContext
class ParsingContext implements DebugHandler {}constructor
constructor( text: string, refDate?: ParsingReference | Date, option?: ParsingOption);property option
readonly option: ParsingOption;property refDate
readonly refDate: Date;property reference
readonly reference: ReferenceWithTimezone;property text
readonly text: string;method createParsingComponents
createParsingComponents: ( components?: | ParsingComponents | { year?: number; month?: number; day?: number; weekday?: number; hour?: number; minute?: number; second?: number; millisecond?: number; meridiem?: number; timezoneOffset?: number; }) => ParsingComponents;method createParsingResult
createParsingResult: ( index: number, textOrEndIndex: number | string, startComponents?: | ParsingComponents | { year?: number; month?: number; day?: number; weekday?: number; hour?: number; minute?: number; second?: number; millisecond?: number; meridiem?: number; timezoneOffset?: number; }, endComponents?: | ParsingComponents | { year?: number; month?: number; day?: number; weekday?: number; hour?: number; minute?: number; second?: number; millisecond?: number; meridiem?: number; timezoneOffset?: number; }) => ParsingResult;method debug
debug: (block: AsyncDebugBlock) => void;class ParsingResult
class ParsingResult implements ParsedResult {}constructor
constructor( reference: ReferenceWithTimezone, index: number, text: string, start?: ParsingComponents, end?: ParsingComponents);property end
end?: ParsingComponents;property index
index: number;property refDate
refDate: Date;property reference
reference: ReferenceWithTimezone;property start
start: ParsingComponents;property text
text: string;method addTag
addTag: (tag: string) => ParsingResult;method addTags
addTags: (tags: string[] | Set<string>) => ParsingResult;method clone
clone: () => ParsingResult;method date
date: () => Date;method tags
tags: () => Set<string>;method toString
toString: () => string;class ReferenceWithTimezone
class ReferenceWithTimezone {}constructor
constructor(instant?: Date, timezoneOffset?: number);property instant
readonly instant: Date;property timezoneOffset
readonly timezoneOffset?: number;method fromDate
static fromDate: (date: Date) => ReferenceWithTimezone;method fromInput
static fromInput: ( input?: ParsingReference | Date, timezoneOverrides?: TimezoneAbbrMap) => ReferenceWithTimezone;method getDateWithAdjustedTimezone
getDateWithAdjustedTimezone: () => Date;method getSystemTimezoneAdjustmentMinute
getSystemTimezoneAdjustmentMinute: ( date?: Date, overrideTimezoneOffset?: number) => number;method getTimezoneOffset
getTimezoneOffset: () => number;Interfaces
interface ParsedComponents
interface ParsedComponents {}interface ParsedResult
interface ParsedResult {}interface Parser
interface Parser {}method extract
extract: ( context: ParsingContext, match: RegExpMatchArray) => | ParsingComponents | ParsingResult | { year?: number; month?: number; day?: number; weekday?: number; hour?: number; minute?: number; second?: number; millisecond?: number; meridiem?: number; timezoneOffset?: number; };method pattern
pattern: (context: ParsingContext) => RegExp;interface ParsingOption
interface ParsingOption {}property forwardDate
forwardDate?: boolean;property timezones
timezones?: TimezoneAbbrMap;interface ParsingReference
interface ParsingReference {}Enums
Type Aliases
type Component
type Component = | 'year' | 'month' | 'day' | 'weekday' | 'hour' | 'minute' | 'second' | 'millisecond' | 'meridiem' | 'timezoneOffset';Namespaces
namespace de
module 'dist/esm/locales/de/index.d.ts' {}variable casual
const casual: Chrono;variable strict
const strict: Chrono;function createCasualConfiguration
createCasualConfiguration: (littleEndian?: boolean) => Configuration;function createConfiguration
createConfiguration: ( strictMode?: boolean, littleEndian?: boolean) => Configuration;function parse
parse: ( text: string, ref?: ParsingReference | Date, option?: ParsingOption) => ParsedResult[];function parseDate
parseDate: ( text: string, ref?: ParsingReference | Date, option?: ParsingOption) => Date;class Chrono
class Chrono {}constructor
constructor(configuration?: Configuration);property defaultConfig
defaultConfig: ENDefaultConfiguration;property parsers
parsers: Parser[];property refiners
refiners: Refiner[];method clone
clone: () => Chrono;method parse
parse: ( text: string, referenceDate?: ParsingReference | Date, option?: ParsingOption) => ParsedResult[];method parseDate
parseDate: ( text: string, referenceDate?: ParsingReference | Date, option?: ParsingOption) => Date | null;class ParsingComponents
class ParsingComponents implements ParsedComponents {}constructor
constructor( reference: ReferenceWithTimezone, knownComponents?: { year?: number; month?: number; day?: number; weekday?: number; hour?: number; minute?: number; second?: number; millisecond?: number; meridiem?: number; timezoneOffset?: number; });method addDurationAsImplied
addDurationAsImplied: (duration: Duration) => ParsingComponents;method addTag
addTag: (tag: string) => ParsingComponents;method addTags
addTags: (tags: string[] | Set<string>) => ParsingComponents;method assign
assign: (component: Component, value: number) => ParsingComponents;method clone
clone: () => ParsingComponents;method createRelativeFromReference
static createRelativeFromReference: ( reference: ReferenceWithTimezone, duration?: Duration) => ParsingComponents;method date
date: () => Date;method delete
delete: (components: Component | Component[]) => void;method get
get: (component: Component) => number | null;method getCertainComponents
getCertainComponents: () => Array<Component>;method imply
imply: (component: Component, value: number) => ParsingComponents;method isCertain
isCertain: (component: Component) => boolean;method isDateWithUnknownYear
isDateWithUnknownYear: () => boolean;method isOnlyDate
isOnlyDate: () => boolean;method isOnlyTime
isOnlyTime: () => boolean;method isOnlyWeekdayComponent
isOnlyWeekdayComponent: () => boolean;method isValidDate
isValidDate: () => boolean;method tags
tags: () => Set<string>;method toString
toString: () => string;class ParsingResult
class ParsingResult implements ParsedResult {}constructor
constructor( reference: ReferenceWithTimezone, index: number, text: string, start?: ParsingComponents, end?: ParsingComponents);property end
end?: ParsingComponents;property index
index: number;property refDate
refDate: Date;property reference
reference: ReferenceWithTimezone;property start
start: ParsingComponents;property text
text: string;method addTag
addTag: (tag: string) => ParsingResult;method addTags
addTags: (tags: string[] | Set<string>) => ParsingResult;method clone
clone: () => ParsingResult;method date
date: () => Date;method tags
tags: () => Set<string>;method toString
toString: () => string;class ReferenceWithTimezone
class ReferenceWithTimezone {}constructor
constructor(instant?: Date, timezoneOffset?: number);property instant
readonly instant: Date;property timezoneOffset
readonly timezoneOffset?: number;method fromDate
static fromDate: (date: Date) => ReferenceWithTimezone;method fromInput
static fromInput: ( input?: ParsingReference | Date, timezoneOverrides?: TimezoneAbbrMap) => ReferenceWithTimezone;method getDateWithAdjustedTimezone
getDateWithAdjustedTimezone: () => Date;method getSystemTimezoneAdjustmentMinute
getSystemTimezoneAdjustmentMinute: ( date?: Date, overrideTimezoneOffset?: number) => number;method getTimezoneOffset
getTimezoneOffset: () => number;interface ParsedResult
interface ParsedResult {}interface Parser
interface Parser {}method extract
extract: ( context: ParsingContext, match: RegExpMatchArray) => | ParsingComponents | ParsingResult | { year?: number; month?: number; day?: number; weekday?: number; hour?: number; minute?: number; second?: number; millisecond?: number; meridiem?: number; timezoneOffset?: number; };method pattern
pattern: (context: ParsingContext) => RegExp;interface ParsingOption
interface ParsingOption {}property forwardDate
forwardDate?: boolean;property timezones
timezones?: TimezoneAbbrMap;interface ParsingReference
interface ParsingReference {}interface Refiner
interface Refiner {}property refine
refine: (context: ParsingContext, results: ParsingResult[]) => ParsingResult[];enum Weekday
enum Weekday { SUNDAY = 0, MONDAY = 1, TUESDAY = 2, WEDNESDAY = 3, THURSDAY = 4, FRIDAY = 5, SATURDAY = 6,}type Component
type Component = | 'year' | 'month' | 'day' | 'weekday' | 'hour' | 'minute' | 'second' | 'millisecond' | 'meridiem' | 'timezoneOffset';namespace en
module 'dist/esm/locales/en/index.d.ts' {}variable casual
const casual: Chrono;variable configuration
const configuration: ENDefaultConfiguration;variable GB
const GB: Chrono;variable strict
const strict: Chrono;function parse
parse: ( text: string, ref?: ParsingReference | Date, option?: ParsingOption) => ParsedResult[];function parseDate
parseDate: ( text: string, ref?: ParsingReference | Date, option?: ParsingOption) => Date;class Chrono
class Chrono {}constructor
constructor(configuration?: Configuration);property defaultConfig
defaultConfig: ENDefaultConfiguration;property parsers
parsers: Parser[];property refiners
refiners: Refiner[];method clone
clone: () => Chrono;method parse
parse: ( text: string, referenceDate?: ParsingReference | Date, option?: ParsingOption) => ParsedResult[];method parseDate
parseDate: ( text: string, referenceDate?: ParsingReference | Date, option?: ParsingOption) => Date | null;class ParsingComponents
class ParsingComponents implements ParsedComponents {}constructor
constructor( reference: ReferenceWithTimezone, knownComponents?: { year?: number; month?: number; day?: number; weekday?: number; hour?: number; minute?: number; second?: number; millisecond?: number; meridiem?: number; timezoneOffset?: number; });method addDurationAsImplied
addDurationAsImplied: (duration: Duration) => ParsingComponents;method addTag
addTag: (tag: string) => ParsingComponents;method addTags
addTags: (tags: string[] | Set<string>) => ParsingComponents;method assign
assign: (component: Component, value: number) => ParsingComponents;method clone
clone: () => ParsingComponents;method createRelativeFromReference
static createRelativeFromReference: ( reference: ReferenceWithTimezone, duration?: Duration) => ParsingComponents;method date
date: () => Date;method delete
delete: (components: Component | Component[]) => void;method get
get: (component: Component) => number | null;method getCertainComponents
getCertainComponents: () => Array<Component>;method imply
imply: (component: Component, value: number) => ParsingComponents;method isCertain
isCertain: (component: Component) => boolean;method isDateWithUnknownYear
isDateWithUnknownYear: () => boolean;method isOnlyDate
isOnlyDate: () => boolean;method isOnlyTime
isOnlyTime: () => boolean;method isOnlyWeekdayComponent
isOnlyWeekdayComponent: () => boolean;method isValidDate
isValidDate: () => boolean;method tags
tags: () => Set<string>;method toString
toString: () => string;class ParsingResult
class ParsingResult implements ParsedResult {}constructor
constructor( reference: ReferenceWithTimezone, index: number, text: string, start?: ParsingComponents, end?: ParsingComponents);property end
end?: ParsingComponents;property index
index: number;property refDate
refDate: Date;property reference
reference: ReferenceWithTimezone;property start
start: ParsingComponents;property text
text: string;method addTag
addTag: (tag: string) => ParsingResult;method addTags
addTags: (tags: string[] | Set<string>) => ParsingResult;method clone
clone: () => ParsingResult;method date
date: () => Date;method tags
tags: () => Set<string>;method toString
toString: () => string;class ReferenceWithTimezone
class ReferenceWithTimezone {}constructor
constructor(instant?: Date, timezoneOffset?: number);property instant
readonly instant: Date;property timezoneOffset
readonly timezoneOffset?: number;method fromDate
static fromDate: (date: Date) => ReferenceWithTimezone;method fromInput
static fromInput: ( input?: ParsingReference | Date, timezoneOverrides?: TimezoneAbbrMap) => ReferenceWithTimezone;method getDateWithAdjustedTimezone
getDateWithAdjustedTimezone: () => Date;method getSystemTimezoneAdjustmentMinute
getSystemTimezoneAdjustmentMinute: ( date?: Date, overrideTimezoneOffset?: number) => number;method getTimezoneOffset
getTimezoneOffset: () => number;interface ParsedResult
interface ParsedResult {}interface Parser
interface Parser {}method extract
extract: ( context: ParsingContext, match: RegExpMatchArray) => | ParsingComponents | ParsingResult | { year?: number; month?: number; day?: number; weekday?: number; hour?: number; minute?: number; second?: number; millisecond?: number; meridiem?: number; timezoneOffset?: number; };method pattern
pattern: (context: ParsingContext) => RegExp;interface ParsingOption
interface ParsingOption {}property forwardDate
forwardDate?: boolean;property timezones
timezones?: TimezoneAbbrMap;interface ParsingReference
interface ParsingReference {}interface Refiner
interface Refiner {}property refine
refine: (context: ParsingContext, results: ParsingResult[]) => ParsingResult[];enum Weekday
enum Weekday { SUNDAY = 0, MONDAY = 1, TUESDAY = 2, WEDNESDAY = 3, THURSDAY = 4, FRIDAY = 5, SATURDAY = 6,}type Component
type Component = | 'year' | 'month' | 'day' | 'weekday' | 'hour' | 'minute' | 'second' | 'millisecond' | 'meridiem' | 'timezoneOffset';namespace es
module 'dist/esm/locales/es/index.d.ts' {}variable casual
const casual: Chrono;variable strict
const strict: Chrono;function createCasualConfiguration
createCasualConfiguration: (littleEndian?: boolean) => Configuration;function createConfiguration
createConfiguration: ( strictMode?: boolean, littleEndian?: boolean) => Configuration;function parse
parse: ( text: string, ref?: ParsingReference | Date, option?: ParsingOption) => ParsedResult[];function parseDate
parseDate: ( text: string, ref?: ParsingReference | Date, option?: ParsingOption) => Date;class Chrono
class Chrono {}constructor
constructor(configuration?: Configuration);property defaultConfig
defaultConfig: ENDefaultConfiguration;property parsers
parsers: Parser[];property refiners
refiners: Refiner[];method clone
clone: () => Chrono;method parse
parse: ( text: string, referenceDate?: ParsingReference | Date, option?: ParsingOption) => ParsedResult[];method parseDate
parseDate: ( text: string, referenceDate?: ParsingReference | Date, option?: ParsingOption) => Date | null;class ParsingComponents
class ParsingComponents implements ParsedComponents {}constructor
constructor( reference: ReferenceWithTimezone, knownComponents?: { year?: number; month?: number; day?: number; weekday?: number; hour?: number; minute?: number; second?: number; millisecond?: number; meridiem?: number; timezoneOffset?: number; });method addDurationAsImplied
addDurationAsImplied: (duration: Duration) => ParsingComponents;method addTag
addTag: (tag: string) => ParsingComponents;method addTags
addTags: (tags: string[] | Set<string>) => ParsingComponents;method assign
assign: (component: Component, value: number) => ParsingComponents;method clone
clone: () => ParsingComponents;method createRelativeFromReference
static createRelativeFromReference: ( reference: ReferenceWithTimezone, duration?: Duration) => ParsingComponents;method date
date: () => Date;method delete
delete: (components: Component | Component[]) => void;method get
get: (component: Component) => number | null;method getCertainComponents
getCertainComponents: () => Array<Component>;method imply
imply: (component: Component, value: number) => ParsingComponents;method isCertain
isCertain: (component: Component) => boolean;method isDateWithUnknownYear
isDateWithUnknownYear: () => boolean;method isOnlyDate
isOnlyDate: () => boolean;method isOnlyTime
isOnlyTime: () => boolean;method isOnlyWeekdayComponent
isOnlyWeekdayComponent: () => boolean;method isValidDate
isValidDate: () => boolean;method tags
tags: () => Set<string>;method toString
toString: () => string;class ParsingResult
class ParsingResult implements ParsedResult {}constructor
constructor( reference: ReferenceWithTimezone, index: number, text: string, start?: ParsingComponents, end?: ParsingComponents);property end
end?: ParsingComponents;property index
index: number;property refDate
refDate: Date;property reference
reference: ReferenceWithTimezone;property start
start: ParsingComponents;property text
text: string;method addTag
addTag: (tag: string) => ParsingResult;method addTags
addTags: (tags: string[] | Set<string>) => ParsingResult;method clone
clone: () => ParsingResult;method date
date: () => Date;method tags
tags: () => Set<string>;method toString
toString: () => string;class ReferenceWithTimezone
class ReferenceWithTimezone {}constructor
constructor(instant?: Date, timezoneOffset?: number);property instant
readonly instant: Date;property timezoneOffset
readonly timezoneOffset?: number;method fromDate
static fromDate: (date: Date) => ReferenceWithTimezone;method fromInput
static fromInput: ( input?: ParsingReference | Date, timezoneOverrides?: TimezoneAbbrMap) => ReferenceWithTimezone;method getDateWithAdjustedTimezone
getDateWithAdjustedTimezone: () => Date;method getSystemTimezoneAdjustmentMinute
getSystemTimezoneAdjustmentMinute: ( date?: Date, overrideTimezoneOffset?: number) => number;method getTimezoneOffset
getTimezoneOffset: () => number;interface ParsedResult
interface ParsedResult {}interface Parser
interface Parser {}method extract
extract: ( context: ParsingContext, match: RegExpMatchArray) => | ParsingComponents | ParsingResult | { year?: number; month?: number; day?: number; weekday?: number; hour?: number; minute?: number; second?: number; millisecond?: number; meridiem?: number; timezoneOffset?: number; };method pattern
pattern: (context: ParsingContext) => RegExp;interface ParsingOption
interface ParsingOption {}property forwardDate
forwardDate?: boolean;property timezones
timezones?: TimezoneAbbrMap;interface ParsingReference
interface ParsingReference {}interface Refiner
interface Refiner {}property refine
refine: (context: ParsingContext, results: ParsingResult[]) => ParsingResult[];enum Weekday
enum Weekday { SUNDAY = 0, MONDAY = 1, TUESDAY = 2, WEDNESDAY = 3, THURSDAY = 4, FRIDAY = 5, SATURDAY = 6,}type Component
type Component = | 'year' | 'month' | 'day' | 'weekday' | 'hour' | 'minute' | 'second' | 'millisecond' | 'meridiem' | 'timezoneOffset';namespace fr
module 'dist/esm/locales/fr/index.d.ts' {}variable casual
const casual: Chrono;variable strict
const strict: Chrono;function createCasualConfiguration
createCasualConfiguration: (littleEndian?: boolean) => Configuration;function createConfiguration
createConfiguration: ( strictMode?: boolean, littleEndian?: boolean) => Configuration;function parse
parse: ( text: string, ref?: ParsingReference | Date, option?: ParsingOption) => ParsedResult[];function parseDate
parseDate: ( text: string, ref?: ParsingReference | Date, option?: ParsingOption) => Date;class Chrono
class Chrono {}constructor
constructor(configuration?: Configuration);property defaultConfig
defaultConfig: ENDefaultConfiguration;property parsers
parsers: Parser[];property refiners
refiners: Refiner[];method clone
clone: () => Chrono;method parse
parse: ( text: string, referenceDate?: ParsingReference | Date, option?: ParsingOption) => ParsedResult[];method parseDate
parseDate: ( text: string, referenceDate?: ParsingReference | Date, option?: ParsingOption) => Date | null;class ParsingComponents
class ParsingComponents implements ParsedComponents {}constructor
constructor( reference: ReferenceWithTimezone, knownComponents?: { year?: number; month?: number; day?: number; weekday?: number; hour?: number; minute?: number; second?: number; millisecond?: number; meridiem?: number; timezoneOffset?: number; });method addDurationAsImplied
addDurationAsImplied: (duration: Duration) => ParsingComponents;method addTag
addTag: (tag: string) => ParsingComponents;method addTags
addTags: (tags: string[] | Set<string>) => ParsingComponents;method assign
assign: (component: Component, value: number) => ParsingComponents;method clone
clone: () => ParsingComponents;method createRelativeFromReference
static createRelativeFromReference: ( reference: ReferenceWithTimezone, duration?: Duration) => ParsingComponents;method date
date: () => Date;method delete
delete: (components: Component | Component[]) => void;method get
get: (component: Component) => number | null;method getCertainComponents
getCertainComponents: () => Array<Component>;method imply
imply: (component: Component, value: number) => ParsingComponents;method isCertain
isCertain: (component: Component) => boolean;method isDateWithUnknownYear
isDateWithUnknownYear: () => boolean;method isOnlyDate
isOnlyDate: () => boolean;method isOnlyTime
isOnlyTime: () => boolean;method isOnlyWeekdayComponent
isOnlyWeekdayComponent: () => boolean;method isValidDate
isValidDate: () => boolean;method tags
tags: () => Set<string>;method toString
toString: () => string;class ParsingResult
class ParsingResult implements ParsedResult {}constructor
constructor( reference: ReferenceWithTimezone, index: number, text: string, start?: ParsingComponents, end?: ParsingComponents);property end
end?: ParsingComponents;property index
index: number;property refDate
refDate: Date;property reference
reference: ReferenceWithTimezone;property start
start: ParsingComponents;property text
text: string;method addTag
addTag: (tag: string) => ParsingResult;method addTags
addTags: (tags: string[] | Set<string>) => ParsingResult;method clone
clone: () => ParsingResult;method date
date: () => Date;method tags
tags: () => Set<string>;method toString
toString: () => string;class ReferenceWithTimezone
class ReferenceWithTimezone {}constructor
constructor(instant?: Date, timezoneOffset?: number);property instant
readonly instant: Date;property timezoneOffset
readonly timezoneOffset?: number;method fromDate
static fromDate: (date: Date) => ReferenceWithTimezone;method fromInput
static fromInput: ( input?: ParsingReference | Date, timezoneOverrides?: TimezoneAbbrMap) => ReferenceWithTimezone;method getDateWithAdjustedTimezone
getDateWithAdjustedTimezone: () => Date;method getSystemTimezoneAdjustmentMinute
getSystemTimezoneAdjustmentMinute: ( date?: Date, overrideTimezoneOffset?: number) => number;method getTimezoneOffset
getTimezoneOffset: () => number;interface ParsedResult
interface ParsedResult {}interface Parser
interface Parser {}method extract
extract: ( context: ParsingContext, match: RegExpMatchArray) => | ParsingComponents | ParsingResult | { year?: number; month?: number; day?: number; weekday?: number; hour?: number; minute?: number; second?: number; millisecond?: number; meridiem?: number; timezoneOffset?: number; };method pattern
pattern: (context: ParsingContext) => RegExp;interface ParsingOption
interface ParsingOption {}property forwardDate
forwardDate?: boolean;property timezones
timezones?: TimezoneAbbrMap;interface ParsingReference
interface ParsingReference {}interface Refiner
interface Refiner {}property refine
refine: (context: ParsingContext, results: ParsingResult[]) => ParsingResult[];enum Weekday
enum Weekday { SUNDAY = 0, MONDAY = 1, TUESDAY = 2, WEDNESDAY = 3, THURSDAY = 4, FRIDAY = 5, SATURDAY = 6,}type Component
type Component = | 'year' | 'month' | 'day' | 'weekday' | 'hour' | 'minute' | 'second' | 'millisecond' | 'meridiem' | 'timezoneOffset';namespace it
module 'dist/esm/locales/it/index.d.ts' {}variable casual
const casual: Chrono;variable GB
const GB: Chrono;variable strict
const strict: Chrono;function createCasualConfiguration
createCasualConfiguration: (littleEndian?: boolean) => Configuration;function createConfiguration
createConfiguration: ( strictMode?: boolean, littleEndian?: boolean) => Configuration;function parse
parse: (text: string, ref?: Date, option?: ParsingOption) => ParsedResult[];function parseDate
parseDate: (text: string, ref?: Date, option?: ParsingOption) => Date;namespace ja
module 'dist/esm/locales/ja/index.d.ts' {}variable casual
const casual: Chrono;variable strict
const strict: Chrono;function createCasualConfiguration
createCasualConfiguration: () => Configuration;function createConfiguration
createConfiguration: (strictMode?: boolean) => Configuration;function parse
parse: ( text: string, ref?: ParsingReference | Date, option?: ParsingOption) => ParsedResult[];function parseDate
parseDate: ( text: string, ref?: ParsingReference | Date, option?: ParsingOption) => Date;class Chrono
class Chrono {}constructor
constructor(configuration?: Configuration);property defaultConfig
defaultConfig: ENDefaultConfiguration;property parsers
parsers: Parser[];property refiners
refiners: Refiner[];method clone
clone: () => Chrono;method parse
parse: ( text: string, referenceDate?: ParsingReference | Date, option?: ParsingOption) => ParsedResult[];method parseDate
parseDate: ( text: string, referenceDate?: ParsingReference | Date, option?: ParsingOption) => Date | null;class ParsingComponents
class ParsingComponents implements ParsedComponents {}constructor
constructor( reference: ReferenceWithTimezone, knownComponents?: { year?: number; month?: number; day?: number; weekday?: number; hour?: number; minute?: number; second?: number; millisecond?: number; meridiem?: number; timezoneOffset?: number; });method addDurationAsImplied
addDurationAsImplied: (duration: Duration) => ParsingComponents;method addTag
addTag: (tag: string) => ParsingComponents;method addTags
addTags: (tags: string[] | Set<string>) => ParsingComponents;method assign
assign: (component: Component, value: number) => ParsingComponents;method clone
clone: () => ParsingComponents;method createRelativeFromReference
static createRelativeFromReference: ( reference: ReferenceWithTimezone, duration?: Duration) => ParsingComponents;method date
date: () => Date;method delete
delete: (components: Component | Component[]) => void;method get
get: (component: Component) => number | null;method getCertainComponents
getCertainComponents: () => Array<Component>;method imply
imply: (component: Component, value: number) => ParsingComponents;method isCertain
isCertain: (component: Component) => boolean;method isDateWithUnknownYear
isDateWithUnknownYear: () => boolean;method isOnlyDate
isOnlyDate: () => boolean;method isOnlyTime
isOnlyTime: () => boolean;method isOnlyWeekdayComponent
isOnlyWeekdayComponent: () => boolean;method isValidDate
isValidDate: () => boolean;method tags
tags: () => Set<string>;method toString
toString: () => string;class ParsingResult
class ParsingResult implements ParsedResult {}constructor
constructor( reference: ReferenceWithTimezone, index: number, text: string, start?: ParsingComponents, end?: ParsingComponents);property end
end?: ParsingComponents;property index
index: number;property refDate
refDate: Date;property reference
reference: ReferenceWithTimezone;property start
start: ParsingComponents;property text
text: string;method addTag
addTag: (tag: string) => ParsingResult;method addTags
addTags: (tags: string[] | Set<string>) => ParsingResult;method clone
clone: () => ParsingResult;method date
date: () => Date;method tags
tags: () => Set<string>;method toString
toString: () => string;class ReferenceWithTimezone
class ReferenceWithTimezone {}constructor
constructor(instant?: Date, timezoneOffset?: number);property instant
readonly instant: Date;property timezoneOffset
readonly timezoneOffset?: number;method fromDate
static fromDate: (date: Date) => ReferenceWithTimezone;method fromInput
static fromInput: ( input?: ParsingReference | Date, timezoneOverrides?: TimezoneAbbrMap) => ReferenceWithTimezone;method getDateWithAdjustedTimezone
getDateWithAdjustedTimezone: () => Date;method getSystemTimezoneAdjustmentMinute
getSystemTimezoneAdjustmentMinute: ( date?: Date, overrideTimezoneOffset?: number) => number;method getTimezoneOffset
getTimezoneOffset: () => number;interface ParsedResult
interface ParsedResult {}interface Parser
interface Parser {}method extract
extract: ( context: ParsingContext, match: RegExpMatchArray) => | ParsingComponents | ParsingResult | { year?: number; month?: number; day?: number; weekday?: number; hour?: number; minute?: number; second?: number; millisecond?: number; meridiem?: number; timezoneOffset?: number; };method pattern
pattern: (context: ParsingContext) => RegExp;interface ParsingOption
interface ParsingOption {}property forwardDate
forwardDate?: boolean;property timezones
timezones?: TimezoneAbbrMap;interface ParsingReference
interface ParsingReference {}interface Refiner
interface Refiner {}property refine
refine: (context: ParsingContext, results: ParsingResult[]) => ParsingResult[];enum Weekday
enum Weekday { SUNDAY = 0, MONDAY = 1, TUESDAY = 2, WEDNESDAY = 3, THURSDAY = 4, FRIDAY = 5, SATURDAY = 6,}type Component
type Component = | 'year' | 'month' | 'day' | 'weekday' | 'hour' | 'minute' | 'second' | 'millisecond' | 'meridiem' | 'timezoneOffset';namespace nl
module 'dist/esm/locales/nl/index.d.ts' {}variable casual
const casual: Chrono;variable strict
const strict: Chrono;function createCasualConfiguration
createCasualConfiguration: (littleEndian?: boolean) => Configuration;function createConfiguration
createConfiguration: ( strictMode?: boolean, littleEndian?: boolean) => Configuration;function parse
parse: ( text: string, ref?: ParsingReference | Date, option?: ParsingOption) => ParsedResult[];function parseDate
parseDate: ( text: string, ref?: ParsingReference | Date, option?: ParsingOption) => Date;class Chrono
class Chrono {}constructor
constructor(configuration?: Configuration);property defaultConfig
defaultConfig: ENDefaultConfiguration;property parsers
parsers: Parser[];property refiners
refiners: Refiner[];method clone
clone: () => Chrono;method parse
parse: ( text: string, referenceDate?: ParsingReference | Date, option?: ParsingOption) => ParsedResult[];method parseDate
parseDate: ( text: string, referenceDate?: ParsingReference | Date, option?: ParsingOption) => Date | null;class ParsingComponents
class ParsingComponents implements ParsedComponents {}constructor
constructor( reference: ReferenceWithTimezone, knownComponents?: { year?: number; month?: number; day?: number; weekday?: number; hour?: number; minute?: number; second?: number; millisecond?: number; meridiem?: number; timezoneOffset?: number; });method addDurationAsImplied
addDurationAsImplied: (duration: Duration) => ParsingComponents;method addTag
addTag: (tag: string) => ParsingComponents;method addTags
addTags: (tags: string[] | Set<string>) => ParsingComponents;method assign
assign: (component: Component, value: number) => ParsingComponents;method clone
clone: () => ParsingComponents;method createRelativeFromReference
static createRelativeFromReference: ( reference: ReferenceWithTimezone, duration?: Duration) => ParsingComponents;method date
date: () => Date;method delete
delete: (components: Component | Component[]) => void;method get
get: (component: Component) => number | null;method getCertainComponents
getCertainComponents: () => Array<Component>;method imply
imply: (component: Component, value: number) => ParsingComponents;method isCertain
isCertain: (component: Component) => boolean;method isDateWithUnknownYear
isDateWithUnknownYear: () => boolean;method isOnlyDate
isOnlyDate: () => boolean;method isOnlyTime
isOnlyTime: () => boolean;method isOnlyWeekdayComponent
isOnlyWeekdayComponent: () => boolean;method isValidDate
isValidDate: () => boolean;method tags
tags: () => Set<string>;method toString
toString: () => string;class ParsingResult
class ParsingResult implements ParsedResult {}constructor
constructor( reference: ReferenceWithTimezone, index: number, text: string, start?: ParsingComponents, end?: ParsingComponents);property end
end?: ParsingComponents;property index
index: number;property refDate
refDate: Date;property reference
reference: ReferenceWithTimezone;property start
start: ParsingComponents;property text
text: string;method addTag
addTag: (tag: string) => ParsingResult;method addTags
addTags: (tags: string[] | Set<string>) => ParsingResult;method clone
clone: () => ParsingResult;method date
date: () => Date;method tags
tags: () => Set<string>;method toString
toString: () => string;class ReferenceWithTimezone
class ReferenceWithTimezone {}constructor
constructor(instant?: Date, timezoneOffset?: number);property instant
readonly instant: Date;property timezoneOffset
readonly timezoneOffset?: number;method fromDate
static fromDate: (date: Date) => ReferenceWithTimezone;method fromInput
static fromInput: ( input?: ParsingReference | Date, timezoneOverrides?: TimezoneAbbrMap) => ReferenceWithTimezone;method getDateWithAdjustedTimezone
getDateWithAdjustedTimezone: () => Date;method getSystemTimezoneAdjustmentMinute
getSystemTimezoneAdjustmentMinute: ( date?: Date, overrideTimezoneOffset?: number) => number;method getTimezoneOffset
getTimezoneOffset: () => number;interface ParsedResult
interface ParsedResult {}interface Parser
interface Parser {}method extract
extract: ( context: ParsingContext, match: RegExpMatchArray) => | ParsingComponents | ParsingResult | { year?: number; month?: number; day?: number; weekday?: number; hour?: number; minute?: number; second?: number; millisecond?: number; meridiem?: number; timezoneOffset?: number; };method pattern
pattern: (context: ParsingContext) => RegExp;interface ParsingOption
interface ParsingOption {}property forwardDate
forwardDate?: boolean;property timezones
timezones?: TimezoneAbbrMap;interface ParsingReference
interface ParsingReference {}interface Refiner
interface Refiner {}property refine
refine: (context: ParsingContext, results: ParsingResult[]) => ParsingResult[];enum Weekday
enum Weekday { SUNDAY = 0, MONDAY = 1, TUESDAY = 2, WEDNESDAY = 3, THURSDAY = 4, FRIDAY = 5, SATURDAY = 6,}type Component
type Component = | 'year' | 'month' | 'day' | 'weekday' | 'hour' | 'minute' | 'second' | 'millisecond' | 'meridiem' | 'timezoneOffset';namespace pt
module 'dist/esm/locales/pt/index.d.ts' {}variable casual
const casual: Chrono;variable strict
const strict: Chrono;function createCasualConfiguration
createCasualConfiguration: (littleEndian?: boolean) => Configuration;function createConfiguration
createConfiguration: ( strictMode?: boolean, littleEndian?: boolean) => Configuration;function parse
parse: ( text: string, ref?: ParsingReference | Date, option?: ParsingOption) => ParsedResult[];function parseDate
parseDate: ( text: string, ref?: ParsingReference | Date, option?: ParsingOption) => Date;class Chrono
class Chrono {}constructor
constructor(configuration?: Configuration);property defaultConfig
defaultConfig: ENDefaultConfiguration;property parsers
parsers: Parser[];property refiners
refiners: Refiner[];method clone
clone: () => Chrono;method parse
parse: ( text: string, referenceDate?: ParsingReference | Date, option?: ParsingOption) => ParsedResult[];method parseDate
parseDate: ( text: string, referenceDate?: ParsingReference | Date, option?: ParsingOption) => Date | null;class ParsingComponents
class ParsingComponents implements ParsedComponents {}constructor
constructor( reference: ReferenceWithTimezone, knownComponents?: { year?: number; month?: number; day?: number; weekday?: number; hour?: number; minute?: number; second?: number; millisecond?: number; meridiem?: number; timezoneOffset?: number; });method addDurationAsImplied
addDurationAsImplied: (duration: Duration) => ParsingComponents;method addTag
addTag: (tag: string) => ParsingComponents;method addTags
addTags: (tags: string[] | Set<string>) => ParsingComponents;method assign
assign: (component: Component, value: number) => ParsingComponents;method clone
clone: () => ParsingComponents;method createRelativeFromReference
static createRelativeFromReference: ( reference: ReferenceWithTimezone, duration?: Duration) => ParsingComponents;method date
date: () => Date;method delete
delete: (components: Component | Component[]) => void;method get
get: (component: Component) => number | null;method getCertainComponents
getCertainComponents: () => Array<Component>;method imply
imply: (component: Component, value: number) => ParsingComponents;method isCertain
isCertain: (component: Component) => boolean;method isDateWithUnknownYear
isDateWithUnknownYear: () => boolean;method isOnlyDate
isOnlyDate: () => boolean;method isOnlyTime
isOnlyTime: () => boolean;method isOnlyWeekdayComponent
isOnlyWeekdayComponent: () => boolean;method isValidDate
isValidDate: () => boolean;method tags
tags: () => Set<string>;method toString
toString: () => string;class ParsingResult
class ParsingResult implements ParsedResult {}constructor
constructor( reference: ReferenceWithTimezone, index: number, text: string, start?: ParsingComponents, end?: ParsingComponents);property end
end?: ParsingComponents;property index
index: number;property refDate
refDate: Date;property reference
reference: ReferenceWithTimezone;property start
start: ParsingComponents;property text
text: string;method addTag
addTag: (tag: string) => ParsingResult;method addTags
addTags: (tags: string[] | Set<string>) => ParsingResult;method clone
clone: () => ParsingResult;method date
date: () => Date;method tags
tags: () => Set<string>;method toString
toString: () => string;class ReferenceWithTimezone
class ReferenceWithTimezone {}constructor
constructor(instant?: Date, timezoneOffset?: number);property instant
readonly instant: Date;property timezoneOffset
readonly timezoneOffset?: number;method fromDate
static fromDate: (date: Date) => ReferenceWithTimezone;method fromInput
static fromInput: ( input?: ParsingReference | Date, timezoneOverrides?: TimezoneAbbrMap) => ReferenceWithTimezone;method getDateWithAdjustedTimezone
getDateWithAdjustedTimezone: () => Date;method getSystemTimezoneAdjustmentMinute
getSystemTimezoneAdjustmentMinute: ( date?: Date, overrideTimezoneOffset?: number) => number;method getTimezoneOffset
getTimezoneOffset: () => number;interface ParsedResult
interface ParsedResult {}interface Parser
interface Parser {}method extract
extract: ( context: ParsingContext, match: RegExpMatchArray) => | ParsingComponents | ParsingResult | { year?: number; month?: number; day?: number; weekday?: number; hour?: number; minute?: number; second?: number; millisecond?: number; meridiem?: number; timezoneOffset?: number; };method pattern
pattern: (context: ParsingContext) => RegExp;interface ParsingOption
interface ParsingOption {}property forwardDate
forwardDate?: boolean;property timezones
timezones?: TimezoneAbbrMap;interface ParsingReference
interface ParsingReference {}interface Refiner
interface Refiner {}property refine
refine: (context: ParsingContext, results: ParsingResult[]) => ParsingResult[];enum Weekday
enum Weekday { SUNDAY = 0, MONDAY = 1, TUESDAY = 2, WEDNESDAY = 3, THURSDAY = 4, FRIDAY = 5, SATURDAY = 6,}type Component
type Component = | 'year' | 'month' | 'day' | 'weekday' | 'hour' | 'minute' | 'second' | 'millisecond' | 'meridiem' | 'timezoneOffset';namespace ru
module 'dist/esm/locales/ru/index.d.ts' {}variable casual
const casual: Chrono;variable strict
const strict: Chrono;function createCasualConfiguration
createCasualConfiguration: () => Configuration;function createConfiguration
createConfiguration: (strictMode?: boolean) => Configuration;function parse
parse: ( text: string, ref?: ParsingReference | Date, option?: ParsingOption) => ParsedResult[];function parseDate
parseDate: ( text: string, ref?: ParsingReference | Date, option?: ParsingOption) => Date;class Chrono
class Chrono {}constructor
constructor(configuration?: Configuration);property defaultConfig
defaultConfig: ENDefaultConfiguration;property parsers
parsers: Parser[];property refiners
refiners: Refiner[];method clone
clone: () => Chrono;method parse
parse: ( text: string, referenceDate?: ParsingReference | Date, option?: ParsingOption) => ParsedResult[];method parseDate
parseDate: ( text: string, referenceDate?: ParsingReference | Date, option?: ParsingOption) => Date | null;class ParsingComponents
class ParsingComponents implements ParsedComponents {}constructor
constructor( reference: ReferenceWithTimezone, knownComponents?: { year?: number; month?: number; day?: number; weekday?: number; hour?: number; minute?: number; second?: number; millisecond?: number; meridiem?: number; timezoneOffset?: number; });method addDurationAsImplied
addDurationAsImplied: (duration: Duration) => ParsingComponents;method addTag
addTag: (tag: string) => ParsingComponents;method addTags
addTags: (tags: string[] | Set<string>) => ParsingComponents;method assign
assign: (component: Component, value: number) => ParsingComponents;method clone
clone: () => ParsingComponents;method createRelativeFromReference
static createRelativeFromReference: ( reference: ReferenceWithTimezone, duration?: Duration) => ParsingComponents;method date
date: () => Date;method delete
delete: (components: Component | Component[]) => void;method get
get: (component: Component) => number | null;method getCertainComponents
getCertainComponents: () => Array<Component>;method imply
imply: (component: Component, value: number) => ParsingComponents;method isCertain
isCertain: (component: Component) => boolean;method isDateWithUnknownYear
isDateWithUnknownYear: () => boolean;method isOnlyDate
isOnlyDate: () => boolean;method isOnlyTime
isOnlyTime: () => boolean;method isOnlyWeekdayComponent
isOnlyWeekdayComponent: () => boolean;method isValidDate
isValidDate: () => boolean;method tags
tags: () => Set<string>;method toString
toString: () => string;class ParsingResult
class ParsingResult implements ParsedResult {}constructor
constructor( reference: ReferenceWithTimezone, index: number, text: string, start?: ParsingComponents, end?: ParsingComponents);property end
end?: ParsingComponents;property index
index: number;property refDate
refDate: Date;property reference
reference: ReferenceWithTimezone;property start
start: ParsingComponents;property text
text: string;method addTag
addTag: (tag: string) => ParsingResult;method addTags
addTags: (tags: string[] | Set<string>) => ParsingResult;method clone
clone: () => ParsingResult;method date
date: () => Date;method tags
tags: () => Set<string>;method toString
toString: () => string;class ReferenceWithTimezone
class ReferenceWithTimezone {}constructor
constructor(instant?: Date, timezoneOffset?: number);property instant
readonly instant: Date;property timezoneOffset
readonly timezoneOffset?: number;method fromDate
static fromDate: (date: Date) => ReferenceWithTimezone;method fromInput
static fromInput: ( input?: ParsingReference | Date, timezoneOverrides?: TimezoneAbbrMap) => ReferenceWithTimezone;method getDateWithAdjustedTimezone
getDateWithAdjustedTimezone: () => Date;method getSystemTimezoneAdjustmentMinute
getSystemTimezoneAdjustmentMinute: ( date?: Date, overrideTimezoneOffset?: number) => number;method getTimezoneOffset
getTimezoneOffset: () => number;interface ParsedResult
interface ParsedResult {}interface Parser
interface Parser {}method extract
extract: ( context: ParsingContext, match: RegExpMatchArray) => | ParsingComponents | ParsingResult | { year?: number; month?: number; day?: number; weekday?: number; hour?: number; minute?: number; second?: number; millisecond?: number; meridiem?: number; timezoneOffset?: number; };method pattern
pattern: (context: ParsingContext) => RegExp;interface ParsingOption
interface ParsingOption {}property forwardDate
forwardDate?: boolean;property timezones
timezones?: TimezoneAbbrMap;interface ParsingReference
interface ParsingReference {}interface Refiner
interface Refiner {}property refine
refine: (context: ParsingContext, results: ParsingResult[]) => ParsingResult[];enum Weekday
enum Weekday { SUNDAY = 0, MONDAY = 1, TUESDAY = 2, WEDNESDAY = 3, THURSDAY = 4, FRIDAY = 5, SATURDAY = 6,}type Component
type Component = | 'year' | 'month' | 'day' | 'weekday' | 'hour' | 'minute' | 'second' | 'millisecond' | 'meridiem' | 'timezoneOffset';namespace sv
module 'dist/esm/locales/sv/index.d.ts' {}variable casual
const casual: Chrono;variable strict
const strict: Chrono;function createCasualConfiguration
createCasualConfiguration: (littleEndian?: boolean) => Configuration;function createConfiguration
createConfiguration: ( strictMode?: boolean, littleEndian?: boolean) => Configuration;function parse
parse: ( text: string, ref?: ParsingReference | Date, option?: ParsingOption) => ParsedResult[];function parseDate
parseDate: ( text: string, ref?: ParsingReference | Date, option?: ParsingOption) => Date;class Chrono
class Chrono {}constructor
constructor(configuration?: Configuration);property defaultConfig
defaultConfig: ENDefaultConfiguration;property parsers
parsers: Parser[];property refiners
refiners: Refiner[];method clone
clone: () => Chrono;method parse
parse: ( text: string, referenceDate?: ParsingReference | Date, option?: ParsingOption) => ParsedResult[];method parseDate
parseDate: ( text: string, referenceDate?: ParsingReference | Date, option?: ParsingOption) => Date | null;class ParsingComponents
class ParsingComponents implements ParsedComponents {}constructor
constructor( reference: ReferenceWithTimezone, knownComponents?: { year?: number; month?: number; day?: number; weekday?: number; hour?: number; minute?: number; second?: number; millisecond?: number; meridiem?: number; timezoneOffset?: number; });method addDurationAsImplied
addDurationAsImplied: (duration: Duration) => ParsingComponents;method addTag
addTag: (tag: string) => ParsingComponents;method addTags
addTags: (tags: string[] | Set<string>) => ParsingComponents;method assign
assign: (component: Component, value: number) => ParsingComponents;method clone
clone: () => ParsingComponents;method createRelativeFromReference
static createRelativeFromReference: ( reference: ReferenceWithTimezone, duration?: Duration) => ParsingComponents;method date
date: () => Date;method delete
delete: (components: Component | Component[]) => void;method get
get: (component: Component) => number | null;method getCertainComponents
getCertainComponents: () => Array<Component>;method imply
imply: (component: Component, value: number) => ParsingComponents;method isCertain
isCertain: (component: Component) => boolean;method isDateWithUnknownYear
isDateWithUnknownYear: () => boolean;method isOnlyDate
isOnlyDate: () => boolean;method isOnlyTime
isOnlyTime: () => boolean;method isOnlyWeekdayComponent
isOnlyWeekdayComponent: () => boolean;method isValidDate
isValidDate: () => boolean;method tags
tags: () => Set<string>;method toString
toString: () => string;class ParsingResult
class ParsingResult implements ParsedResult {}constructor
constructor( reference: ReferenceWithTimezone, index: number, text: string, start?: ParsingComponents, end?: ParsingComponents);property end
end?: ParsingComponents;property index
index: number;property refDate
refDate: Date;property reference
reference: ReferenceWithTimezone;property start
start: ParsingComponents;property text
text: string;method addTag
addTag: (tag: string) => ParsingResult;method addTags
addTags: (tags: string[] | Set<string>) => ParsingResult;method clone
clone: () => ParsingResult;method date
date: () => Date;method tags
tags: () => Set<string>;method toString
toString: () => string;class ReferenceWithTimezone
class ReferenceWithTimezone {}constructor
constructor(instant?: Date, timezoneOffset?: number);property instant
readonly instant: Date;property timezoneOffset
readonly timezoneOffset?: number;method fromDate
static fromDate: (date: Date) => ReferenceWithTimezone;method fromInput
static fromInput: ( input?: ParsingReference | Date, timezoneOverrides?: TimezoneAbbrMap) => ReferenceWithTimezone;method getDateWithAdjustedTimezone
getDateWithAdjustedTimezone: () => Date;method getSystemTimezoneAdjustmentMinute
getSystemTimezoneAdjustmentMinute: ( date?: Date, overrideTimezoneOffset?: number) => number;method getTimezoneOffset
getTimezoneOffset: () => number;interface ParsedResult
interface ParsedResult {}interface Parser
interface Parser {}method extract
extract: ( context: ParsingContext, match: RegExpMatchArray) => | ParsingComponents | ParsingResult | { year?: number; month?: number; day?: number; weekday?: number; hour?: number; minute?: number; second?: number; millisecond?: number; meridiem?: number; timezoneOffset?: number; };method pattern
pattern: (context: ParsingContext) => RegExp;interface ParsingOption
interface ParsingOption {}property forwardDate
forwardDate?: boolean;property timezones
timezones?: TimezoneAbbrMap;interface ParsingReference
interface ParsingReference {}interface Refiner
interface Refiner {}property refine
refine: (context: ParsingContext, results: ParsingResult[]) => ParsingResult[];enum Weekday
enum Weekday { SUNDAY = 0, MONDAY = 1, TUESDAY = 2, WEDNESDAY = 3, THURSDAY = 4, FRIDAY = 5, SATURDAY = 6,}type Component
type Component = | 'year' | 'month' | 'day' | 'weekday' | 'hour' | 'minute' | 'second' | 'millisecond' | 'meridiem' | 'timezoneOffset';namespace uk
module 'dist/esm/locales/uk/index.d.ts' {}variable casual
const casual: Chrono;variable strict
const strict: Chrono;function createCasualConfiguration
createCasualConfiguration: () => Configuration;function createConfiguration
createConfiguration: (strictMode: boolean) => Configuration;function parse
parse: ( text: string, ref?: ParsingReference | Date, option?: ParsingOption) => ParsedResult[];function parseDate
parseDate: ( text: string, ref?: ParsingReference | Date, option?: ParsingOption) => Date;class Chrono
class Chrono {}constructor
constructor(configuration?: Configuration);property defaultConfig
defaultConfig: ENDefaultConfiguration;property parsers
parsers: Parser[];property refiners
refiners: Refiner[];method clone
clone: () => Chrono;method parse
parse: ( text: string, referenceDate?: ParsingReference | Date, option?: ParsingOption) => ParsedResult[];method parseDate
parseDate: ( text: string, referenceDate?: ParsingReference | Date, option?: ParsingOption) => Date | null;class ParsingComponents
class ParsingComponents implements ParsedComponents {}constructor
constructor( reference: ReferenceWithTimezone, knownComponents?: { year?: number; month?: number; day?: number; weekday?: number; hour?: number; minute?: number; second?: number; millisecond?: number; meridiem?: number; timezoneOffset?: number; });method addDurationAsImplied
addDurationAsImplied: (duration: Duration) => ParsingComponents;method addTag
addTag: (tag: string) => ParsingComponents;method addTags
addTags: (tags: string[] | Set<string>) => ParsingComponents;method assign
assign: (component: Component, value: number) => ParsingComponents;method clone
clone: () => ParsingComponents;method createRelativeFromReference
static createRelativeFromReference: ( reference: ReferenceWithTimezone, duration?: Duration) => ParsingComponents;method date
date: () => Date;method delete
delete: (components: Component | Component[]) => void;method get
get: (component: Component) => number | null;method getCertainComponents
getCertainComponents: () => Array<Component>;method imply
imply: (component: Component, value: number) => ParsingComponents;method isCertain
isCertain: (component: Component) => boolean;method isDateWithUnknownYear
isDateWithUnknownYear: () => boolean;method isOnlyDate
isOnlyDate: () => boolean;method isOnlyTime
isOnlyTime: () => boolean;method isOnlyWeekdayComponent
isOnlyWeekdayComponent: () => boolean;method isValidDate
isValidDate: () => boolean;method tags
tags: () => Set<string>;method toString
toString: () => string;class ParsingResult
class ParsingResult implements ParsedResult {}constructor
constructor( reference: ReferenceWithTimezone, index: number, text: string, start?: ParsingComponents, end?: ParsingComponents);property end
end?: ParsingComponents;property index
index: number;property refDate
refDate: Date;property reference
reference: ReferenceWithTimezone;property start
start: ParsingComponents;property text
text: string;method addTag
addTag: (tag: string) => ParsingResult;method addTags
addTags: (tags: string[] | Set<string>) => ParsingResult;method clone
clone: () => ParsingResult;method date
date: () => Date;method tags
tags: () => Set<string>;method toString
toString: () => string;class ReferenceWithTimezone
class ReferenceWithTimezone {}constructor
constructor(instant?: Date, timezoneOffset?: number);property instant
readonly instant: Date;property timezoneOffset
readonly timezoneOffset?: number;method fromDate
static fromDate: (date: Date) => ReferenceWithTimezone;method fromInput
static fromInput: ( input?: ParsingReference | Date, timezoneOverrides?: TimezoneAbbrMap) => ReferenceWithTimezone;method getDateWithAdjustedTimezone
getDateWithAdjustedTimezone: () => Date;method getSystemTimezoneAdjustmentMinute
getSystemTimezoneAdjustmentMinute: ( date?: Date, overrideTimezoneOffset?: number) => number;method getTimezoneOffset
getTimezoneOffset: () => number;interface ParsedResult
interface ParsedResult {}interface Parser
interface Parser {}method extract
extract: ( context: ParsingContext, match: RegExpMatchArray) => | ParsingComponents | ParsingResult | { year?: number; month?: number; day?: number; weekday?: number; hour?: number; minute?: number; second?: number; millisecond?: number; meridiem?: number; timezoneOffset?: number; };method pattern
pattern: (context: ParsingContext) => RegExp;interface ParsingOption
interface ParsingOption {}property forwardDate
forwardDate?: boolean;property timezones
timezones?: TimezoneAbbrMap;interface ParsingReference
interface ParsingReference {}interface Refiner
interface Refiner {}property refine
refine: (context: ParsingContext, results: ParsingResult[]) => ParsingResult[];enum Weekday
enum Weekday { SUNDAY = 0, MONDAY = 1, TUESDAY = 2, WEDNESDAY = 3, THURSDAY = 4, FRIDAY = 5, SATURDAY = 6,}type Component
type Component = | 'year' | 'month' | 'day' | 'weekday' | 'hour' | 'minute' | 'second' | 'millisecond' | 'meridiem' | 'timezoneOffset';namespace zh
module 'dist/esm/locales/zh/index.d.ts' {}variable casual
const casual: Chrono;variable strict
const strict: Chrono;function createCasualConfiguration
createCasualConfiguration: () => Configuration;function createConfiguration
createConfiguration: () => Configuration;function parse
parse: ( text: string, ref?: ParsingReference | Date, option?: ParsingOption) => ParsedResult[];function parseDate
parseDate: ( text: string, ref?: ParsingReference | Date, option?: ParsingOption) => Date;class Chrono
class Chrono {}constructor
constructor(configuration?: Configuration);property defaultConfig
defaultConfig: ENDefaultConfiguration;property parsers
parsers: Parser[];property refiners
refiners: Refiner[];method clone
clone: () => Chrono;method parse
parse: ( text: string, referenceDate?: ParsingReference | Date, option?: ParsingOption) => ParsedResult[];method parseDate
parseDate: ( text: string, referenceDate?: ParsingReference | Date, option?: ParsingOption) => Date | null;class ParsingComponents
class ParsingComponents implements ParsedComponents {}constructor
constructor( reference: ReferenceWithTimezone, knownComponents?: { year?: number; month?: number; day?: number; weekday?: number; hour?: number; minute?: number; second?: number; millisecond?: number; meridiem?: number; timezoneOffset?: number; });method addDurationAsImplied
addDurationAsImplied: (duration: Duration) => ParsingComponents;method addTag
addTag: (tag: string) => ParsingComponents;method addTags
addTags: (tags: string[] | Set<string>) => ParsingComponents;method assign
assign: (component: Component, value: number) => ParsingComponents;method clone
clone: () => ParsingComponents;method createRelativeFromReference
static createRelativeFromReference: ( reference: ReferenceWithTimezone, duration?: Duration) => ParsingComponents;method date
date: () => Date;method delete
delete: (components: Component | Component[]) => void;method get
get: (component: Component) => number | null;method getCertainComponents
getCertainComponents: () => Array<Component>;method imply
imply: (component: Component, value: number) => ParsingComponents;method isCertain
isCertain: (component: Component) => boolean;method isDateWithUnknownYear
isDateWithUnknownYear: () => boolean;method isOnlyDate
isOnlyDate: () => boolean;method isOnlyTime
isOnlyTime: () => boolean;method isOnlyWeekdayComponent
isOnlyWeekdayComponent: () => boolean;method isValidDate
isValidDate: () => boolean;method tags
tags: () => Set<string>;method toString
toString: () => string;class ParsingResult
class ParsingResult implements ParsedResult {}constructor
constructor( reference: ReferenceWithTimezone, index: number, text: string, start?: ParsingComponents, end?: ParsingComponents);property end
end?: ParsingComponents;property index
index: number;property refDate
refDate: Date;property reference
reference: ReferenceWithTimezone;property start
start: ParsingComponents;property text
text: string;method addTag
addTag: (tag: string) => ParsingResult;method addTags
addTags: (tags: string[] | Set<string>) => ParsingResult;method clone
clone: () => ParsingResult;method date
date: () => Date;method tags
tags: () => Set<string>;method toString
toString: () => string;class ReferenceWithTimezone
class ReferenceWithTimezone {}constructor
constructor(instant?: Date, timezoneOffset?: number);property instant
readonly instant: Date;property timezoneOffset
readonly timezoneOffset?: number;method fromDate
static fromDate: (date: Date) => ReferenceWithTimezone;method fromInput
static fromInput: ( input?: ParsingReference | Date, timezoneOverrides?: TimezoneAbbrMap) => ReferenceWithTimezone;method getDateWithAdjustedTimezone
getDateWithAdjustedTimezone: () => Date;method getSystemTimezoneAdjustmentMinute
getSystemTimezoneAdjustmentMinute: ( date?: Date, overrideTimezoneOffset?: number) => number;method getTimezoneOffset
getTimezoneOffset: () => number;interface ParsedResult
interface ParsedResult {}interface Parser
interface Parser {}method extract
extract: ( context: ParsingContext, match: RegExpMatchArray) => | ParsingComponents | ParsingResult | { year?: number; month?: number; day?: number; weekday?: number; hour?: number; minute?: number; second?: number; millisecond?: number; meridiem?: number; timezoneOffset?: number; };method pattern
pattern: (context: ParsingContext) => RegExp;interface ParsingOption
interface ParsingOption {}property forwardDate
forwardDate?: boolean;property timezones
timezones?: TimezoneAbbrMap;interface ParsingReference
interface ParsingReference {}interface Refiner
interface Refiner {}property refine
refine: (context: ParsingContext, results: ParsingResult[]) => ParsingResult[];enum Weekday
enum Weekday { SUNDAY = 0, MONDAY = 1, TUESDAY = 2, WEDNESDAY = 3, THURSDAY = 4, FRIDAY = 5, SATURDAY = 6,}type Component
type Component = | 'year' | 'month' | 'day' | 'weekday' | 'hour' | 'minute' | 'second' | 'millisecond' | 'meridiem' | 'timezoneOffset';namespace hans
module 'dist/esm/locales/zh/hans/index.d.ts' {}variable casual
const casual: Chrono;variable hans
const hans: Chrono;variable strict
const strict: Chrono;function createCasualConfiguration
createCasualConfiguration: () => Configuration;function createConfiguration
createConfiguration: () => Configuration;function parse
parse: ( text: string, ref?: ParsingReference | Date, option?: ParsingOption) => ParsedResult[];function parseDate
parseDate: ( text: string, ref?: ParsingReference | Date, option?: ParsingOption) => Date;class Chrono
class Chrono {}constructor
constructor(configuration?: Configuration);property defaultConfig
defaultConfig: ENDefaultConfiguration;property parsers
parsers: Parser[];property refiners
refiners: Refiner[];method clone
clone: () => Chrono;method parse
parse: ( text: string, referenceDate?: ParsingReference | Date, option?: ParsingOption) => ParsedResult[];method parseDate
parseDate: ( text: string, referenceDate?: ParsingReference | Date, option?: ParsingOption) => Date | null;class ParsingComponents
class ParsingComponents implements ParsedComponents {}constructor
constructor( reference: ReferenceWithTimezone, knownComponents?: { year?: number; month?: number; day?: number; weekday?: number; hour?: number; minute?: number; second?: number; millisecond?: number; meridiem?: number; timezoneOffset?: number; });method addDurationAsImplied
addDurationAsImplied: (duration: Duration) => ParsingComponents;method addTag
addTag: (tag: string) => ParsingComponents;method addTags
addTags: (tags: string[] | Set<string>) => ParsingComponents;method assign
assign: (component: Component, value: number) => ParsingComponents;method clone
clone: () => ParsingComponents;method createRelativeFromReference
static createRelativeFromReference: ( reference: ReferenceWithTimezone, duration?: Duration) => ParsingComponents;method date
date: () => Date;method delete
delete: (components: Component | Component[]) => void;method get
get: (component: Component) => number | null;method getCertainComponents
getCertainComponents: () => Array<Component>;method imply
imply: (component: Component, value: number) => ParsingComponents;method isCertain
isCertain: (component: Component) => boolean;method isDateWithUnknownYear
isDateWithUnknownYear: () => boolean;method isOnlyDate
isOnlyDate: () => boolean;method isOnlyTime
isOnlyTime: () => boolean;method isOnlyWeekdayComponent
isOnlyWeekdayComponent: () => boolean;method isValidDate
isValidDate: () => boolean;method tags
tags: () => Set<string>;method toString
toString: () => string;class ParsingResult
class ParsingResult implements ParsedResult {}constructor
constructor( reference: ReferenceWithTimezone, index: number, text: string, start?: ParsingComponents, end?: ParsingComponents);property end
end?: ParsingComponents;property index
index: number;property refDate
refDate: Date;property reference
reference: ReferenceWithTimezone;property start
start: ParsingComponents;property text
text: string;method addTag
addTag: (tag: string) => ParsingResult;method addTags
addTags: (tags: string[] | Set<string>) => ParsingResult;method clone
clone: () => ParsingResult;method date
date: () => Date;method tags
tags: () => Set<string>;method toString
toString: () => string;class ReferenceWithTimezone
class ReferenceWithTimezone {}constructor
constructor(instant?: Date, timezoneOffset?: number);property instant
readonly instant: Date;property timezoneOffset
readonly timezoneOffset?: number;method fromDate
static fromDate: (date: Date) => ReferenceWithTimezone;method fromInput
static fromInput: ( input?: ParsingReference | Date, timezoneOverrides?: TimezoneAbbrMap) => ReferenceWithTimezone;method getDateWithAdjustedTimezone
getDateWithAdjustedTimezone: () => Date;method getSystemTimezoneAdjustmentMinute
getSystemTimezoneAdjustmentMinute: ( date?: Date, overrideTimezoneOffset?: number) => number;method getTimezoneOffset
getTimezoneOffset: () => number;interface ParsedResult
interface ParsedResult {}interface Parser
interface Parser {}method extract
extract: ( context: ParsingContext, match: RegExpMatchArray) => | ParsingComponents | ParsingResult | { year?: number; month?: number; day?: number; weekday?: number; hour?: number; minute?: number; second?: number; millisecond?: number; meridiem?: number; timezoneOffset?: number; };method pattern
pattern: (context: ParsingContext) => RegExp;interface ParsingOption
interface ParsingOption {}property forwardDate
forwardDate?: boolean;property timezones
timezones?: TimezoneAbbrMap;interface ParsingReference
interface ParsingReference {}interface Refiner
interface Refiner {}property refine
refine: (context: ParsingContext, results: ParsingResult[]) => ParsingResult[];enum Weekday
enum Weekday { SUNDAY = 0, MONDAY = 1, TUESDAY = 2, WEDNESDAY = 3, THURSDAY = 4, FRIDAY = 5, SATURDAY = 6,}type Component
type Component = | 'year' | 'month' | 'day' | 'weekday' | 'hour' | 'minute' | 'second' | 'millisecond' | 'meridiem' | 'timezoneOffset';namespace hant
module 'dist/esm/locales/zh/hant/index.d.ts' {}variable casual
const casual: Chrono;variable hant
const hant: Chrono;variable strict
const strict: Chrono;function createCasualConfiguration
createCasualConfiguration: () => Configuration;function createConfiguration
createConfiguration: () => Configuration;function parse
parse: ( text: string, ref?: ParsingReference | Date, option?: ParsingOption) => ParsedResult[];function parseDate
parseDate: ( text: string, ref?: ParsingReference | Date, option?: ParsingOption) => Date;class Chrono
class Chrono {}constructor
constructor(configuration?: Configuration);property defaultConfig
defaultConfig: ENDefaultConfiguration;property parsers
parsers: Parser[];property refiners
refiners: Refiner[];method clone
clone: () => Chrono;method parse
parse: ( text: string, referenceDate?: ParsingReference | Date, option?: ParsingOption) => ParsedResult[];method parseDate
parseDate: ( text: string, referenceDate?: ParsingReference | Date, option?: ParsingOption) => Date | null;class ParsingComponents
class ParsingComponents implements ParsedComponents {}constructor
constructor( reference: ReferenceWithTimezone, knownComponents?: { year?: number; month?: number; day?: number; weekday?: number; hour?: number; minute?: number; second?: number; millisecond?: number; meridiem?: number; timezoneOffset?: number; });method addDurationAsImplied
addDurationAsImplied: (duration: Duration) => ParsingComponents;method addTag
addTag: (tag: string) => ParsingComponents;method addTags
addTags: (tags: string[] | Set<string>) => ParsingComponents;method assign
assign: (component: Component, value: number) => ParsingComponents;method clone
clone: () => ParsingComponents;method createRelativeFromReference
static createRelativeFromReference: ( reference: ReferenceWithTimezone, duration?: Duration) => ParsingComponents;method date
date: () => Date;method delete
delete: (components: Component | Component[]) => void;method get
get: (component: Component) => number | null;method getCertainComponents
getCertainComponents: () => Array<Component>;method imply
imply: (component: Component, value: number) => ParsingComponents;method isCertain
isCertain: (component: Component) => boolean;method isDateWithUnknownYear
isDateWithUnknownYear: () => boolean;method isOnlyDate
isOnlyDate: () => boolean;method isOnlyTime
isOnlyTime: () => boolean;method isOnlyWeekdayComponent
isOnlyWeekdayComponent: () => boolean;method isValidDate
isValidDate: () => boolean;method tags
tags: () => Set<string>;method toString
toString: () => string;class ParsingResult
class ParsingResult implements ParsedResult {}constructor
constructor( reference: ReferenceWithTimezone, index: number, text: string, start?: ParsingComponents, end?: ParsingComponents);property end
end?: ParsingComponents;property index
index: number;property refDate
refDate: Date;property reference
reference: ReferenceWithTimezone;property start
start: ParsingComponents;property text
text: string;method addTag
addTag: (tag: string) => ParsingResult;method addTags
addTags: (tags: string[] | Set<string>) => ParsingResult;method clone
clone: () => ParsingResult;method date
date: () => Date;method tags
tags: () => Set<string>;method toString
toString: () => string;class ReferenceWithTimezone
class ReferenceWithTimezone {}constructor
constructor(instant?: Date, timezoneOffset?: number);property instant
readonly instant: Date;property timezoneOffset
readonly timezoneOffset?: number;method fromDate
static fromDate: (date: Date) => ReferenceWithTimezone;method fromInput
static fromInput: ( input?: ParsingReference | Date, timezoneOverrides?: TimezoneAbbrMap) => ReferenceWithTimezone;method getDateWithAdjustedTimezone
getDateWithAdjustedTimezone: () => Date;method getSystemTimezoneAdjustmentMinute
getSystemTimezoneAdjustmentMinute: ( date?: Date, overrideTimezoneOffset?: number) => number;method getTimezoneOffset
getTimezoneOffset: () => number;interface ParsedResult
interface ParsedResult {}interface Parser
interface Parser {}method extract
extract: ( context: ParsingContext, match: RegExpMatchArray) => | ParsingComponents | ParsingResult | { year?: number; month?: number; day?: number; weekday?: number; hour?: number; minute?: number; second?: number; millisecond?: number; meridiem?: number; timezoneOffset?: number; };method pattern
pattern: (context: ParsingContext) => RegExp;interface ParsingOption
interface ParsingOption {}property forwardDate
forwardDate?: boolean;property timezones
timezones?: TimezoneAbbrMap;interface ParsingReference
interface ParsingReference {}interface Refiner
interface Refiner {}property refine
refine: (context: ParsingContext, results: ParsingResult[]) => ParsingResult[];enum Weekday
enum Weekday { SUNDAY = 0, MONDAY = 1, TUESDAY = 2, WEDNESDAY = 3, THURSDAY = 4, FRIDAY = 5, SATURDAY = 6,}type Component
type Component = | 'year' | 'month' | 'day' | 'weekday' | 'hour' | 'minute' | 'second' | 'millisecond' | 'meridiem' | 'timezoneOffset';Package Files (18)
- dist/esm/chrono.d.ts
- dist/esm/index.d.ts
- dist/esm/locales/de/index.d.ts
- dist/esm/locales/en/index.d.ts
- dist/esm/locales/es/index.d.ts
- dist/esm/locales/fr/index.d.ts
- dist/esm/locales/it/index.d.ts
- dist/esm/locales/ja/index.d.ts
- dist/esm/locales/nl/index.d.ts
- dist/esm/locales/pt/index.d.ts
- dist/esm/locales/ru/index.d.ts
- dist/esm/locales/sv/index.d.ts
- dist/esm/locales/uk/index.d.ts
- dist/esm/locales/zh/hans/index.d.ts
- dist/esm/locales/zh/hant/index.d.ts
- dist/esm/locales/zh/index.d.ts
- dist/esm/results.d.ts
- dist/esm/types.d.ts
Dependencies (0)
No dependencies.
Dev Dependencies (15)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/chrono-node.
- Markdown[](https://www.jsdocs.io/package/chrono-node)
- HTML<a href="https://www.jsdocs.io/package/chrono-node"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 16099 ms. - Missing or incorrect documentation? Open an issue for this package.
