Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
};
PositiveParser.extract = function(text, ref, match, opt) {
console.log({ text: text, ref: ref, match: match, opt: opt });
let pr = new chrono.ParsedResult({
ref: ref,
text: match[0],
index: match.index,
start: {
year: parseInt(match[0], 10)
}
});
const x = implyLateStart(pr);
return x;
};
var custom = new en.Chrono();
custom.parsers.push(BCParser);
custom.parsers.push(NegativeParser);
custom.parsers.push(CenturyParser);
custom.parsers.push(PositiveParser);
class Timelist extends React.Component {
constructor(props) {
super(props);
// update is a function that grabs the state
this.editSeveral = props.editSeveral;
this.state = {
when_original: null,
when_happened: null,
resolution: null,
parsed: null,
result.start.assign('meridiem', 1);
result.start.assign('hour', result.start.get('hour') + 12);
}
if (result.end && !result.end.isCertain('meridiem')
&& result.end.get('hour') >= 1 && result.end.get('hour') < 6) {
result.end.assign('meridiem', 1);
result.end.assign('hour', result.end.get('hour') + 12);
}
});
return results;
};
// Create a new custom Chrono. The initial pipeline 'option' can also be specified as
// - new chrono.Chrono(exports.options.strictOption())
// - new chrono.Chrono(exports.options.casualOption())
var custom = new chrono.Chrono();
custom.refiners.push(guessPMRefiner);
const chrono = require('chrono-node')
const matcher = /^remind @?([^\s]+)(?: to )?(.*)$/
const parser = new chrono.Chrono()
parser.refiners.push(require('./lib/refiners/start-of-day'))
const options = {
forwardDate: true,
startOfDay: 9
}
module.exports = (input, from) => {
const match = input.match(matcher)
if (!match) {
// This doesn't look like a reminder, so bail early
return null
}
// Pull out the initial matches
let [, who, what] = match