gregorian to BS converter that doesn't use a lookup table