Skip to content

Commit

Permalink
fix #1109
Browse files Browse the repository at this point in the history
  • Loading branch information
spencermountain committed Jun 10, 2024
1 parent 329f52b commit bb38c7d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion plugins/dates/src/api/dates.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const api = function (View) {
constructor(document, pointer, groups, opts = {}) {
super(document, pointer, groups)
this.viewType = 'Dates'
this.opts = opts
this.opts = Object.assign({}, opts)
}

get(n) {
Expand Down
20 changes: 15 additions & 5 deletions scratch.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
/* eslint-disable no-console, no-unused-vars */
import nlp from './src/three.js'
// import plg from './plugins/dates/src/plugin.js'
// nlp.plugin(plg)
import plg from './plugins/dates/src/plugin.js'
nlp.plugin(plg)
// nlp.verbose('tagger')

const text_1 = '90 hertz'
const doc = nlp(text_1)
const doc = nlp("I'll deal with that bug tomorrow")

doc.values().toNumber().debug()
const context = {
timezone: 'Canada/Eastern',
today: '2020-02-20',
punt: { weeks: 2 },
dayStart: '8:00am',
dayEnd: '5:30pm',
}

const datesViews = doc.dates(context)
console.log(context)
datesViews.json()
console.log(context)

// let doc = nlp(` `).debug()

Expand Down

0 comments on commit bb38c7d

Please sign in to comment.