Skip to content
On this page
I need help with this

Playground

Markwhen parser on github

Input
Output
{
  "timelines": [
    {
      "events": {
        "value": [
          {
            "value": [
              {
                "value": {
                  "eventString": "Jan 2019: The Bahamas [Bahamas](location) #Travel",
                  "eventText": " The Bahamas [Bahamas](location) #Travel",
                  "dateRangeIso": {
                    "fromDateTimeIso": "2019-01-01T00:00:00.000Z",
                    "toDateTimeIso": "2019-02-01T00:00:00.000Z"
                  },
                  "rangeInText": {
                    "from": 108,
                    "to": 158,
                    "type": "event"
                  },
                  "eventDescription": {
                    "tags": [
                      "Travel"
                    ],
                    "supplemental": [],
                    "locations": [
                      "Bahamas"
                    ],
                    "matchedListItems": [],
                    "eventDescription": "The Bahamas "
                  },
                  "dateText": "Jan 2019",
                  "dateRangeInText": {
                    "type": "dateRange",
                    "from": 108,
                    "to": 116
                  }
                }
              }
            ],
            "tags": [
              "Travel"
            ],
            "style": "group",
            "rangeInText": {
              "from": 87,
              "to": 93,
              "type": "section"
            },
            "startExpanded": true,
            "title": "Travel"
          },
          {
            "value": [
              {
                "value": {
                  "eventString": "August 2020 - now: Getting my degree #Education",
                  "eventText": " Getting my degree #Education",
                  "dateRangeIso": {
                    "fromDateTimeIso": "2020-08-01T00:00:00.000Z",
                    "toDateTimeIso": "2023-12-28T15:26:42.745+00:00"
                  },
                  "rangeInText": {
                    "from": 188,
                    "to": 236,
                    "type": "event"
                  },
                  "eventDescription": {
                    "tags": [
                      "Education"
                    ],
                    "supplemental": [],
                    "locations": [],
                    "matchedListItems": [],
                    "eventDescription": "Getting my degree"
                  },
                  "dateText": "August 2020 - now",
                  "dateRangeInText": {
                    "type": "dateRange",
                    "from": 188,
                    "to": 205
                  }
                }
              }
            ],
            "tags": [],
            "style": "section",
            "rangeInText": {
              "from": 168,
              "to": 176,
              "type": "section"
            },
            "startExpanded": true,
            "title": "Other stuff"
          }
        ]
      },
      "head": {
        "value": {
          "eventString": "Jan 2019: The Bahamas [Bahamas](location) #Travel",
          "eventText": " The Bahamas [Bahamas](location) #Travel",
          "dateRangeIso": {
            "fromDateTimeIso": "2019-01-01T00:00:00.000Z",
            "toDateTimeIso": "2019-02-01T00:00:00.000Z"
          },
          "rangeInText": {
            "from": 108,
            "to": 158,
            "type": "event"
          },
          "eventDescription": {
            "tags": [
              "Travel"
            ],
            "supplemental": [],
            "locations": [
              "Bahamas"
            ],
            "matchedListItems": [],
            "eventDescription": "The Bahamas "
          },
          "dateText": "Jan 2019",
          "dateRangeInText": {
            "type": "dateRange",
            "from": 108,
            "to": 116
          }
        }
      },
      "tail": {
        "value": {
          "eventString": "August 2020 - now: Getting my degree #Education",
          "eventText": " Getting my degree #Education",
          "dateRangeIso": {
            "fromDateTimeIso": "2020-08-01T00:00:00.000Z",
            "toDateTimeIso": "2023-12-28T15:26:42.745+00:00"
          },
          "rangeInText": {
            "from": 188,
            "to": 236,
            "type": "event"
          },
          "eventDescription": {
            "tags": [
              "Education"
            ],
            "supplemental": [],
            "locations": [],
            "matchedListItems": [],
            "eventDescription": "Getting my degree"
          },
          "dateText": "August 2020 - now",
          "dateRangeInText": {
            "type": "dateRange",
            "from": 188,
            "to": 205
          }
        }
      },
      "ids": {},
      "ranges": [
        {
          "type": "tag",
          "from": 55,
          "to": 62,
          "content": {
            "tag": "Travel"
          }
        },
        {
          "type": "tag",
          "from": 69,
          "to": 79,
          "content": {
            "tag": "Education"
          }
        },
        {
          "type": "headerKey",
          "from": 0,
          "to": 5
        },
        {
          "type": "headerKeyColon",
          "from": 5,
          "to": 6
        },
        {
          "type": "headerValue",
          "from": 6,
          "to": 26
        },
        {
          "type": "headerKey",
          "from": 27,
          "to": 38
        },
        {
          "type": "headerKeyColon",
          "from": 38,
          "to": 39
        },
        {
          "type": "headerValue",
          "from": 39,
          "to": 53
        },
        {
          "type": "headerKey",
          "from": 55,
          "to": 62
        },
        {
          "type": "headerKeyColon",
          "from": 62,
          "to": 63
        },
        {
          "type": "headerValue",
          "from": 63,
          "to": 68
        },
        {
          "type": "headerKey",
          "from": 69,
          "to": 79
        },
        {
          "type": "headerKeyColon",
          "from": 79,
          "to": 80
        },
        {
          "type": "headerValue",
          "from": 80,
          "to": 85
        },
        {
          "type": "tag",
          "from": 100,
          "to": 107,
          "content": {
            "tag": "Travel"
          }
        },
        {
          "from": 87,
          "to": 93,
          "type": "section"
        },
        {
          "type": "tag",
          "from": 150,
          "to": 157,
          "content": {
            "tag": "Travel"
          }
        },
        {
          "type": "dateRange",
          "from": 108,
          "to": 116
        },
        {
          "type": "dateRangeColon",
          "from": 116,
          "to": 117
        },
        {
          "from": 158,
          "to": 166,
          "type": "section"
        },
        {
          "from": 168,
          "to": 176,
          "type": "section"
        },
        {
          "type": "tag",
          "from": 225,
          "to": 235,
          "content": {
            "tag": "Education"
          }
        },
        {
          "type": "dateRange",
          "from": 188,
          "to": 205
        },
        {
          "type": "dateRangeColon",
          "from": 205,
          "to": 206
        },
        {
          "from": 236,
          "to": 246,
          "type": "section"
        }
      ],
      "foldables": {
        "0": {
          "startLine": 0,
          "startIndex": 0,
          "endIndex": 85,
          "type": "header",
          "foldStartIndex": 0
        },
        "87": {
          "type": "section",
          "startLine": 6,
          "startIndex": 87,
          "endIndex": 166,
          "foldStartIndex": 107
        },
        "168": {
          "type": "section",
          "startLine": 10,
          "startIndex": 168,
          "endIndex": 246,
          "foldStartIndex": 187
        }
      },
      "header": {
        "title": "My timeline example",
        "description": "Hello, world!",
        ")Travel": "blue",
        ")Education": ")ab5",
        "dateFormat": "M/d/y"
      },
      "metadata": {
        "earliestTime": "2019-01-01T00:00:00.000Z",
        "latestTime": "2023-12-28T15:26:42.745+00:00",
        "maxDurationDays": 1244.6435502893519,
        "startLineIndex": 0,
        "startStringIndex": 0,
        "endLineIndex": 14,
        "endStringIndex": 248
      }
    }
  ],
  "parser": {
    "version": "0.10.5"
  }
}

You can also play with the parser and the output of the playground in the javascript console, with window.parse and window.markwhen, respectively.