import { TestData } from "../types/TestData";
import { runtest } from "../util/test-util";
import { isRFC3339 } from "./isRFC3339";
//For the tests see
// 
test("isRFC3339", () => {
    runtest(testdata, isRFC3339)
})

const testdata: TestData[] = [
    {
        it: 'isRFC3339',
        valid: [
            '2009-05-19 14:39:22-06:00',
            '2009-05-19 14:39:22+06:00',
            '2009-05-19 14:39:22Z',
            '2009-05-19T14:39:22-06:00',
            '2009-05-19T14:39:22Z',
            '2010-02-18T16:23:48.3-06:00',
            '2010-02-18t16:23:33+06:00',
            '2010-02-18t16:23:33+06:00',
            '2010-02-18t16:12:23.23334444z',
            '2010-02-18T16:23:55.2283Z',
            '2009-05-19 14:39:22.500Z',
            '2009-05-19 14:39:55Z',
            '2009-05-31 14:39:55Z',
            '2009-05-31 14:53:60Z',
            '2010-02-18t00:23:23.33+06:00',
            '2010-02-18t00:23:32.33+00:00',
            '2010-02-18t00:23:32.33+23:00',
          ],
          invalid: [
            '2010-02-18t00:23:32.33+24:00',
            '2009-05-31 14:60:55Z',
            '2010-02-18t24:23.33+0600',
            '2009-05-00 1439,55Z',
            '2009-13-19 14:39:22-06:00',
            '2009-05-00 14:39:22+0600',
            '2009-00-1 14:39:22Z',
            '2009-05-19T14:39:22',
            'nonsense2021-01-01T00:00:00Z',
            '2021-01-01T00:00:00Znonsense',
          ]
    } 
]