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

18 lines 572 B
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 const dateOnlyRegex = /^\d{4}-\d{2}-\d{2}$/; const monthOnlyRegex = /^\d{4}-(?:0[1-9]|1[0-2])$/; /** * Checks if ISO date-string is date-only. */ export function isIsoDateOnly(dateString) { return dateOnlyRegex.test(dateString); } /** * Checks if ISO date-string is month-only. */ export function isIsoMonthOnly(dateString) { //todo find out how to use or if to use return monthOnlyRegex.test(dateString); } //# sourceMappingURL=is-iso-only.js.map