function periodCompatibleWithTickformat(period, tickformat) {
    return (
        /%f/.test(tickformat) ? period >= ONEMICROSEC :
        /%L/.test(tickformat) ? period >= ONEMILLI :
        /%[SX]/.test(tickformat) ? period >= ONESEC :
        /%M/.test(tickformat) ? period >= ONEMIN :
        /%[HI]/.test(tickformat) ? period >= ONEHOUR :
        /%p/.test(tickformat) ? period >= HALFDAY :
        /%[Aadejuwx]/.test(tickformat) ? period >= ONEDAY :
        /%[UVW]/.test(tickformat) ? period >= ONEWEEK :
        /%[Bbm]/.test(tickformat) ? period >= ONEMINMONTH :
        /%[q]/.test(tickformat) ? period >= ONEMINQUARTER :
        /%[Yy]/.test(tickformat) ? period >= ONEMINYEAR :
        true
    );
}
Checks if the given period is at least the period described by the tickformat or larger. If that
is the case, they are compatible, because then the tickformat can be used to describe the period.
E.g. it doesn't make sense to put a year label on a period spanning only a month.
@param {number} period in ms
@param {string} tickformat
@returns {boolean}