Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/proxy_server/node_modules/chrono-node/src/ drwxr-xr-x | |
| Viewing file: Select action/file-type:
var options = exports.options = require('./options');
exports.parser = require('./parsers/parser');
exports.refiner = require('./refiners/refiner');
exports.Parser = exports.parser.Parser;
exports.Refiner = exports.refiner.Refiner;
exports.Filter = exports.refiner.Filter;
exports.ParsedResult = require('./result').ParsedResult;
exports.ParsedComponents = require('./result').ParsedComponents;
var Chrono = function(option) {
option = option || exports.options.casualOption();
this.parsers = new Object(option.parsers);
this.refiners = new Object(option.refiners);
};
Chrono.prototype.parse = function(text, refDate, opt) {
refDate = refDate || new Date();
opt = opt || {};
opt.forwardDate = opt.forwardDate || opt.forwardDate;
var allResults = [];
this.parsers.forEach(function (parser) {
var results = parser.execute(text, refDate, opt);
allResults = allResults.concat(results);
});
allResults.sort(function(a, b) {
return a.index - b.index;
});
this.refiners.forEach(function (refiner) {
allResults = refiner.refine(text, allResults, opt);
});
return allResults;
};
Chrono.prototype.parseDate = function(text, refDate, opt) {
var results = this.parse(text, refDate, opt);
if (results.length > 0) {
return results[0].start.date();
}
return null;
};
exports.Chrono = Chrono;
exports.strict = new Chrono( options.strictOption() );
exports.casual = new Chrono( options.casualOption() );
exports.en = new Chrono( options.mergeOptions([
options.en.casual, options.commonPostProcessing]));
exports.en_GB = new Chrono( options.mergeOptions([
options.en_GB.casual, options.commonPostProcessing]));
exports.de = new Chrono( options.mergeOptions([
options.de.casual, options.en, options.commonPostProcessing]));
exports.nl = new Chrono( options.mergeOptions([
options.nl.casual, options.en, options.commonPostProcessing]));
exports.pt = new Chrono( options.mergeOptions([
options.pt.casual, options.en, options.commonPostProcessing]));
exports.es = new Chrono( options.mergeOptions([
options.es.casual, options.en, options.commonPostProcessing]));
exports.fr = new Chrono( options.mergeOptions([
options.fr.casual, options.en, options.commonPostProcessing]));
exports.ja = new Chrono( options.mergeOptions([
options.ja.casual, options.en, options.commonPostProcessing]));
exports.parse = function () {
return exports.casual.parse.apply(exports.casual, arguments);
};
exports.parseDate = function () {
return exports.casual.parseDate.apply(exports.casual, arguments);
};
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0448 ]-- |