Update toAtom() and test case to use DATE_ATOM constant, fix 'quarter' typo