This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const moment = require('moment-timezone') | |
const logger = require('tracer').colorConsole() | |
const { RRule, RRuleSet, rrulestr } = require('rrule') | |
function untilStringToDate(until) { | |
const re = /^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z?)?$/ | |
const bits = re.exec(until) | |
if (!bits) throw new Error(`Invalid UNTIL value: ${until}`) |
OlderNewer