This will produce an object that can be used to create a tree for navigating by decade, year, month or day. It will also optionally choose the best one (based on the first divergence).
Parsing the Cookbook example it can produce the following navigations:
Automatic choice:
1986
January
Wed Jan 01 1986
1986 Chesapeake and Ohio Canal, Washington, D.C., Maryland, West Virginia, official map and guide
1987
January
Thu Jan 01 1987
1987 Chesapeake and Ohio Canal, Washington, D.C., Maryland, West Virginia, official map and guide"
By century:
1900 - 1999
1980 - 1989
1986
January
Wed Jan 01 1986
1986 Chesapeake and Ohio Canal, Washington, D.C., Maryland, West Virginia, official map and guide (1986-01-01T00:00:00+00:00)
1987
January
Thu Jan 01 1987
1987 Chesapeake and Ohio Canal, Washington, D.C., Maryland, West Virginia, official map and guide (1987-01-01T00:00:00+00:00)"
By decade:
1980 - 1989
1986
January
Wed Jan 01 1986
1986 Chesapeake and Ohio Canal, Washington, D.C., Maryland, West Virginia, official map and guide
1987
January
Thu Jan 01 1987
1987 Chesapeake and Ohio Canal, Washington, D.C., Maryland, West Virginia, official map and guide
By year:
1986
January
Wed Jan 01 1986
1986 Chesapeake and Ohio Canal, Washington, D.C., Maryland, West Virginia, official map and guide
1987
January
Thu Jan 01 1987
1987 Chesapeake and Ohio Canal, Washington, D.C., Maryland, West Virginia, official map and guide
By month: (note, this adds year to the labels)
January 1986
Wed Jan 01 1986
1986 Chesapeake and Ohio Canal, Washington, D.C., Maryland, West Virginia, official map and guide
January 1987
Thu Jan 01 1987
1987 Chesapeake and Ohio Canal, Washington, D.C., Maryland, West Virginia, official map and guide
By day:
Wed Jan 01 1986
1986 Chesapeake and Ohio Canal, Washington, D.C., Maryland, West Virginia, official map and guide
Thu Jan 01 1987
1987 Chesapeake and Ohio Canal, Washington, D.C., Maryland, West Virginia, official map and guide
The tree structure includes some basic information for rendering:
type T = {
id: string;
type: 'day';
count: number;
label: InternationalString;
}
And then also numeric representations if you want to build your own labels (e.g. year, day, month numbers)
This will produce an object that can be used to create a tree for navigating by decade, year, month or day. It will also optionally choose the best one (based on the first divergence).
Parsing the Cookbook example it can produce the following navigations:
Automatic choice:
By century:
By decade:
By year:
By month: (note, this adds year to the labels)
By day:
The tree structure includes some basic information for rendering:
And then also numeric representations if you want to build your own labels (e.g. year, day, month numbers)
The final resource includes: