Add OpenAPI docs, frontend, migrations, and API updates
- OpenAPI: add missing endpoints (add-from-url, subscriptions, public availability) - OpenAPI: CalendarSubscription schema, Subscriptions tag - Frontend app - Migrations: count_for_availability, subscriptions_sync, user_preferences, calendar_settings - Config, rate limit, auth, calendar, booking, ICS, availability, user service updates Made-with: Cursor
This commit is contained in:
40
frontend/node_modules/date-fns/isValid.js
generated
vendored
Normal file
40
frontend/node_modules/date-fns/isValid.js
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
import { isDate } from "./isDate.js";
|
||||
import { toDate } from "./toDate.js";
|
||||
|
||||
/**
|
||||
* @name isValid
|
||||
* @category Common Helpers
|
||||
* @summary Is the given date valid?
|
||||
*
|
||||
* @description
|
||||
* Returns false if argument is Invalid Date and true otherwise.
|
||||
* Argument is converted to Date using `toDate`. See [toDate](https://date-fns.org/docs/toDate)
|
||||
* Invalid Date is a Date, whose time value is NaN.
|
||||
*
|
||||
* Time value of Date: http://es5.github.io/#x15.9.1.1
|
||||
*
|
||||
* @param date - The date to check
|
||||
*
|
||||
* @returns The date is valid
|
||||
*
|
||||
* @example
|
||||
* // For the valid date:
|
||||
* const result = isValid(new Date(2014, 1, 31))
|
||||
* //=> true
|
||||
*
|
||||
* @example
|
||||
* // For the value, convertible into a date:
|
||||
* const result = isValid(1393804800000)
|
||||
* //=> true
|
||||
*
|
||||
* @example
|
||||
* // For the invalid date:
|
||||
* const result = isValid(new Date(''))
|
||||
* //=> false
|
||||
*/
|
||||
export function isValid(date) {
|
||||
return !((!isDate(date) && typeof date !== "number") || isNaN(+toDate(date)));
|
||||
}
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default isValid;
|
||||
Reference in New Issue
Block a user