{
  "schema": "https://bars.commonsware.com/conformance/schema/render-fixture.schema.json",
  "version": "0.1.0",
  "cases": [
    {
      "name": "parse_date_time-no-args-iso8601",
      "spotlight": true,
      "description": "parse_date_time with no args parses an ISO 8601 UTC string.",
      "template": "{{ dt | parse_date_time }}",
      "context": {
        "dt": "1970-01-01T00:00:02Z"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "1970-01-01T00:00:02Z"
      }
    },
    {
      "name": "parse_date_time-iso8601-utc",
      "description": "parse_date_time with 'iso8601' parses an ISO 8601 UTC string.",
      "template": "{{ dt | parse_date_time: 'iso8601' }}",
      "context": {
        "dt": "1970-01-01T00:00:02Z"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "1970-01-01T00:00:02Z"
      }
    },
    {
      "name": "parse_date_time-rfc3339-normalizes-offset",
      "spotlight": true,
      "description": "parse_date_time with 'rfc3339' normalizes an explicit offset to UTC.",
      "template": "{{ dt | parse_date_time: 'rfc3339' }}",
      "context": {
        "dt": "1970-01-01T05:30:00+05:30"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "1970-01-01T00:00:00Z"
      }
    },
    {
      "name": "parse_date_time-iso8601-normalizes-offset",
      "description": "parse_date_time with 'iso8601' normalizes an explicit offset to UTC.",
      "template": "{{ dt | parse_date_time: 'iso8601' }}",
      "context": {
        "dt": "1970-01-01T05:30:00+05:30"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "1970-01-01T00:00:00Z"
      }
    },
    {
      "name": "parse_date_time-iso8601-naive-datetime-as-utc",
      "description": "parse_date_time with 'iso8601' treats a naive datetime (no offset) as UTC.",
      "template": "{{ dt | parse_date_time: 'iso8601' }}",
      "context": {
        "dt": "1970-01-01T00:00:05"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "1970-01-01T00:00:05Z"
      }
    },
    {
      "name": "parse_date_time-iso8601-date-only-as-utc-midnight",
      "description": "parse_date_time with 'iso8601' treats a date-only string as UTC midnight.",
      "template": "{{ dt | parse_date_time: 'iso8601' }}",
      "context": {
        "dt": "1970-01-02"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "1970-01-02T00:00:00Z"
      }
    },
    {
      "name": "parse_date_time-treat-as-local-false-naive-as-utc",
      "description": "parse_date_time with treatAsLocal='false' treats a naive datetime as UTC.",
      "template": "{{ dt | parse_date_time: 'iso8601' 'false' }}",
      "context": {
        "dt": "1970-01-01T00:00:05"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "1970-01-01T00:00:05Z"
      }
    },
    {
      "name": "parse_date_time-rfc1123",
      "description": "parse_date_time with 'rfc1123' parses an RFC 1123 string.",
      "template": "{{ dt | parse_date_time: 'rfc1123' }}",
      "context": {
        "dt": "Thu, 01 Jan 1970 00:00:02 GMT"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "1970-01-01T00:00:02Z"
      }
    },
    {
      "name": "parse_date_time-rfc2822",
      "description": "parse_date_time with 'rfc2822' parses an RFC 1123-format string.",
      "template": "{{ dt | parse_date_time: 'rfc2822' }}",
      "context": {
        "dt": "Thu, 01 Jan 1970 00:00:02 GMT"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "1970-01-01T00:00:02Z"
      }
    },
    {
      "name": "parse_date_time-unicode-pattern",
      "description": "parse_date_time with a Unicode pattern parses a matching string.",
      "template": "{{ dt | parse_date_time: 'MM/dd/uuuu HH:mm:ss' }}",
      "context": {
        "dt": "01/01/1970 00:00:05"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "1970-01-01T00:00:05Z"
      }
    },
    {
      "name": "parse_date_time-unparseable-iso8601-is-null",
      "description": "parse_date_time returns null for a string that cannot be parsed as iso8601.",
      "template": "{{ dt | parse_date_time: 'iso8601' }}",
      "context": {
        "dt": "not-a-date"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "null"
      }
    },
    {
      "name": "parse_date_time-unparseable-unicode-pattern-is-null",
      "description": "parse_date_time returns null for a string that does not match the given Unicode pattern.",
      "template": "{{ dt | parse_date_time: 'MM/dd/uuuu HH:mm:ss' }}",
      "context": {
        "dt": "not-a-date"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "null"
      }
    },
    {
      "name": "parse_date_time-unparseable-rfc1123-is-null",
      "description": "parse_date_time returns null for a string that cannot be parsed as rfc1123.",
      "template": "{{ dt | parse_date_time: 'rfc1123' }}",
      "context": {
        "dt": "not-a-date"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "null"
      }
    },
    {
      "name": "parse_date_time-treat-as-local-true-utc-string",
      "description": "parse_date_time with treatAsLocal='true' and a UTC string normalizes to UTC.",
      "template": "{{ dt | parse_date_time: 'iso8601' 'true' }}",
      "context": {
        "dt": "1970-01-01T00:00:05Z"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "1970-01-01T00:00:05Z"
      }
    },
    {
      "name": "parse_date_time-too-many-args-is-error",
      "description": "parse_date_time throws when given more than two arguments.",
      "template": "{{ dt | parse_date_time: 'iso8601' 'false' 'extra' }}",
      "context": {
        "dt": "2024-01-01"
      },
      "expect": {
        "kind": "error",
        "errorCode": "KB-2002"
      }
    }
  ]
}
