UNPKG

@awsui/components-react

Version:

AWS UI is a collection of [React](https://reactjs.org/) components that help create intuitive, responsive, and accessible user experiences for web applications. It is developed by Amazon Web Services (AWS). This work is available under the terms of the [A

8 lines (7 loc) 477 B
export var isoToDisplay = function (value) { return value.replace(/-/g, '/'); }; export var displayToIso = function (value) { return value.replace(/\//g, '-'); }; export var daysInMonth = function (date) { return new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate(); }; export var parseDate = function (value) { var _a = value.split('-'), year = _a[0], month = _a[1], day = _a[2]; return new Date(Number(year), (Number(month) || 1) - 1, Number(day) || 1); };