How to use the chrono-node.default function in chrono-node

To help you get started, we’ve selected a few chrono-node examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nylas-mail-lives / nylas-mail / packages / client-app / src / flux / models / event.es6 View on Github external
displayTitle() {
    const displayTitle = this.title.replace(/.*Invitation: /, "")
    const [displayTitleWithoutDate, date] = displayTitle.split(" @ ")
    if (!chrono) {
      chrono = require('chrono-node').default; //eslint-disable-line
    }
    if (date && chrono.parseDate(date)) {
      return displayTitleWithoutDate
    }
    return displayTitle
  }
github nylas-mail-lives / nylas-mail / packages / client-app / src / date-utils.es6 View on Github external
function getChrono() {
  if (!_chrono) {
    _chrono = require('chrono-node').default; //eslint-disable-line
  }
  return _chrono;
}

chrono-node

A natural language date parser in Javascript

MIT
Latest version published 2 months ago

Package Health Score

83 / 100
Full package analysis

Similar packages