UNPKG

@awsui/components-react

Version:

On July 19th, 2022, we launched [Cloudscape Design System](https://cloudscape.design). Cloudscape is an evolution of AWS-UI. It consists of user interface guidelines, front-end components, design resources, and development tools for building intuitive, en

15 lines 549 B
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 export function parseDate(value, strict = false) { const [yearString, monthString, dayString] = value.split('-'); const year = Number(yearString); const month = Number(monthString); const day = Number(dayString); if (strict) { if (isNaN(year) || isNaN(month) || isNaN(day)) { return null; } } return new Date(year, (month || 1) - 1, day || 1); } //# sourceMappingURL=parse-date.js.map