Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

487 B
Raw Blame
import { formatDateValue, parseDateValue } from '../date-value'

it.each(['2025-02-30', '2025-02', '2025-2-03', '2025-02-03T00:00:00Z', '0000-01-01'])(
  'rejects noncanonical or impossible civil dates: %s',
  (value) => {
    expect(parseDateValue(value)).toBeNull()
  },
)

it.each(['2024-02-29', '2025-02-28', '0099-01-01'])(
  'roundtrips valid civil dates without native Date year coercion: %s',
  (value) => {
    expect(formatDateValue(parseDateValue(value)!)).toBe(value)
  },
)