New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@quasar/quasar-ui-qcalendar

Package Overview
Dependencies
Maintainers
6
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@quasar/quasar-ui-qcalendar - npm Package Compare versions

Comparing version

to
3.2.1

732

dist/types/index.d.ts

@@ -1,3 +0,1 @@

// @ts-ignore
/// <reference types="@quasar/app" />
import Vue, { VueConstructor } from 'vue'

@@ -313,366 +311,364 @@ import { LooseDictionary } from './ts-helpers'

export interface Timestamp {
/**
* Returns today's date in YYYY-MM-DD format
* @returns Returns today's date in YYYY-MM-DD format
*/
today (): string
/**
* Returns the start of the week based on the passed in arguments
* @param timestamp A timestamp object
* @param weekdays The normal weekdays array looks like this `[0,1,2,3,4,5,6]` where 0=Sunday, 1=Monday, etc. A week that starts on Monday, would look like this: `[1,2,3,4,5,6,0]` and a 5-day workweek would look like this: `[1,2,3,4,5]`
* @param today A timestamp object that represents 'today' or a specified point in time. If passed in, then the relative information to the start-of-week timestamp object will be updated
* @returns A timestamp object representing the start of the week
*/
getStartOfWeek (timestamp : Timestamp, weekdays? : NumberArray, today? : Timestamp): Timestamp
/**
* Returns the end of the week based on the passed in arguments
* @param timestamp A timestamp object
* @param weekdays The normal weekdays array looks like this `[0,1,2,3,4,5,6]` where 0=Sunday, 1=Monday, etc. A week that starts on Monday, would look like this: `[1,2,3,4,5,6,0]` and a 5-day workweek would look like this: `[1,2,3,4,5]`
* @param today A timestamp object that represent 'today' or a specified point in time. If passed in, then the relative information to the end-of-week timestamp object will be updated
* @returns A timestamp object representing the end of the week
*/
getEndOfWeek (timestamp : Timestamp, weekdays? : NumberArray, today? : Timestamp): Timestamp
/**
* Returns the start of the month based on the passed in timestamp object
* @param timestamp A timestamp object
* @returns A timestamp object representing the start of the month
*/
getStartOfMonth (timestamp : Timestamp): Timestamp
/**
* Returns the end of the month based on the passed in timestamp object
* @param timestamp A timestamp object
* @returns A timestamp object representing the end of the month
*/
getEndOfMonth (timestamp : Timestamp): Timestamp
/**
* Parses the passed in value and returns the number of minutes since midnight
* @param input Value may be a Number (minutes since midnight) or String (hh:mm:ss where seconds are optional) or Object (must have keys **hour** and **minute**)
* @returns The number of minutes since midnight
*/
parseTime (input : TimeObjectOrNumberOrString): number
/**
* Validates the passed in date/time string (YYYY-MM-DD hh:mm:ss)
* @param input A date/time string in the form `YYYY-MM-DD hh:mm:ss` (seconds are optional)
* @returns True if the passed in date/time string is of correct form
*/
validateTimestamp (input : string): boolean
/**
* Parses a date/time string to a simple timestamp object. For a more complete timestamp, use parseTimestamp
* @param input A date/time string in the form `YYYY-MM-DD hh:mm:ss` (seconds are optional)
* @returns A timestamp object based on the passed in argument. Returns 'null' on error
*/
parsed (input : string): TimestampOrNull
/**
* Parses a date/time string to the timestamp object. Very similar to the `parsed` method, except also updates timestamp with formatted and relative information
* @param input A date/time string in the form `YYYY-MM-DD hh:mm:ss` (seconds are optional)
* @returns A timestamp object based on the passed in argument. Returns 'null' on error
*/
parseTimestamp (input : string): TimestampOrNull
/**
* Parses a JavaScript Date object to the timestamp object
* @param input A JavaScript Date object
* @returns A formatted timestamp object based on the passed in argument (see updateFormatted)
*/
parseDate (input : Date): TimestampOrNull
/**
* Takes a timestamp and returns a JavaScript Date with time set to 00:00
* @param timestamp A timestamp object
* @returns The returned value is a JavaScript Date
*/
makeDate (timestamp : Timestamp): Date
/**
* Takes a timestamp and returns a JavaScript Date
* @param timestamp A timestamp object
* @returns The returned value is a JavaScript Date
*/
makeDateTime (timestamp : Timestamp): Date
/**
* Turns passed in timestamp object to a day identifier
* @param timestamp A timestamp object
* @returns The returned number is in a number representing `YYYYMMdd`
*/
getDayIdentifier (timestamp : Timestamp): number
/**
* Turns passed in timestamp object to a time identifier
* @param timestamp A timestamp object
* @returns The returned number is in a number representing `hhmm`
*/
getTimeIdentifier (timestamp : Timestamp): number
/**
* Turns passed in timestamp object to a date/time identifier
* @param timestamp A timestamp object
* @returns The returned number is in a number representing `YYYYMMddhhmm`
*/
getDayTimeIdentifier (timestamp : Timestamp): number
/**
* Returns the number of milliseconds between the two days
* @param timestamp1 A timestamp object
* @param timestamp2 A timestamp object
* @param strict If true, then negative values are not allowed
* @returns The number of milliseconds between the two timestamp objects. 0 if **strict** is true and the value would be negative
*/
diffTimestamp (timestamp1 : Timestamp, timestamp2 : Timestamp, strict : boolean): number
/**
* Updates the relative information in the timestamp object. The relative information includes, compared to the **now** object, `past`, `current` and `future` booleans
* @param timestamp A timestamp object
* @param now A timestamp object representing a **now** time (fixed point in time -- usually **today**)
* @param time If true, also uses time to adjust the relative information
* @returns A timestamp object
*/
updateRelative (timestamp : Timestamp, now : Timestamp, time? : boolean): Timestamp
/**
* Updates the timestamp object with the passed in minutes
* @param timestamp A timestamp object
* @param minutes The number of minutes since midnight
* @param now A timestamp object, if set, used to adjust the relative information
* @returns A timestamp object
*/
updateMinutes (timestamp : Timestamp, minutes : number, now? : Timestamp): Timestamp
/**
* Updates the timestamp object with the weekday information
* @param timestamp A timestamp object
* @returns A timestamp object
*/
updateWeekday (timestamp : Timestamp): Timestamp
/**
* Updates the timestamp object with the doy (day of year) information
* @param timestamp A timestamp object
* @returns A timestamp object
*/
updateDayOfYear (timestamp : Timestamp): Timestamp
/**
* Updates the timestamp object with the workweek (work week) information
* @param timestamp A timestamp object
* @returns A timestamp object
*/
updateWorkWeek (timestamp : Timestamp): Timestamp
/**
* Updates the timestamp object to be disabled if it matches one of the items from `disabledDays`
* @param timestamp A timestamp object
* @param disabledBefore A date in the form `YYYY-MM-DD` where all dates before, and including, will be disabled
* @param disabledAfter A date in the form `YYYY-MM-DD` where all dates after, and including, will be disabled
* @param disabledWeekdays An array of numbers representing the weekdays, where 0=Sunday to 6=Saturday
* @param disabledDays An array of disabled days. If an array is contained within the array with a start and end date, it will be treated as a range
* @returns A timestamp object with `timestamp.disabled` true if a match was found
*/
updateDisabled (timestamp : Timestamp, disabledBefore? : string, disabledAfter? : string, disabledWeekdays? : NumberArray, disabledDays? : StringArray): Timestamp
/**
* Updates the timestamp object with formatted information (`time`, `date`, `weekday`, `doy` and `workweek`)
* @param timestamp A timestamp object
* @returns A timestamp object
*/
updateFormatted (timestamp : Timestamp): Timestamp
/**
* Returns the doy (day of year) for an unformatted timestamp
* @param timestamp A timestamp object
* @returns The day of the year
*/
getDayOfYear (timestamp : Timestamp): number
/**
* Returns the workweek (work week number) for an unformatted timestamp
* @param timestamp A timestamp object. If no timestamp is passed, then uses current date
* @returns The work week number of the year. If passed an invalid date, the return value is always 0
*/
getWorkWeek (timestamp? : Timestamp): number
/**
* Returns the weekday (day of the week) for an unformatted timestamp
* @param timestamp A timestamp object
* @returns The week day number (0=Sunday, 1=Monday, etc)
*/
getWeekday (timestamp : Timestamp): number
/**
* Returns true if the passed in year is a leap year
* @param year A number representing the year in YYYY format
* @returns Returns true if the passed in year is a leap year
*/
isLeapYear (year : number): boolean
/**
* Returns number of days in the spefified month for the specified year (takes into account leap years)
* @param year A number representing the year in YYYY format
* @param month A number representing the month from 0 (January) to 11 (December). For performance reasons, no checking is done to validate this value is in range. An exception will occur if it is not
* @returns Returns true if the passed in year is a leap year
*/
daysInMonth (year : number, month : number): number
/**
* Makes a copy of the passed Timestamp
* @param timestamp A timestamp object
* @returns A copy of the passed in timestamp object
*/
copyTimestamp (timestamp : Timestamp): Timestamp
/**
* Compares two timestamps
* @param timestamp1 A timestamp object
* @param timestamp2 A timestamp object
* @returns true if timestamps are the same, otherwise false
*/
compareTimestamps (timestamp1 : Timestamp, timestamp2 : Timestamp): boolean
/**
* Compares two timestamps if the dates are the same
* @param timestamp1 A timestamp object
* @param timestamp2 A timestamp object
* @returns true if timestamps dates are the same, otherwise false
*/
compareDate (timestamp1 : Timestamp, timestamp2 : Timestamp): boolean
/**
* Compares two timestamps if the times are the same
* @param timestamp1 A timestamp object
* @param timestamp2 A timestamp object
* @returns true if timestamps times are the same, otherwise false
*/
compareTime (timestamp1 : Timestamp, timestamp2 : Timestamp): boolean
/**
* Compares two timestamps if the dates and times are the same
* @param timestamp1 A timestamp object
* @param timestamp2 A timestamp object
* @returns true if timestamps dates and times are the same, otherwise false
*/
compareDateTime (timestamp1 : Timestamp, timestamp2 : Timestamp): boolean
/**
* Pads the passed in number to the specfied length. Passing in `(2,2)` returns `02`
* @param x The number to pad
* @param length The length of the paddedIng
* @returns A padded value
*/
padNumber (x : number, length : number): string
/**
* Returns the timestamp as a padded date
* @param timestamp A timestamp object
* @returns A date as a padded value in the form `YYYY-MM-DD`. Instead of `2020-1-2`, this function formats it as `2020-01-02`
*/
getDate (timestamp : Timestamp): string
/**
* Returns the timestamp as a padded time
* @param timestamp A timestamp object
* @returns A time as a padded value in the form `hh:mm`. Instead of `2:3`, this function formats it as `02:03`
*/
getTime (timestamp : Timestamp): string
/**
* Returns the timestamp as a padded date and time. If time is not available, then only the date will be used
* @param timestamp A timestamp object
* @returns A date and time as a padded value in the form `YYYY-MM-DD hh:mm`. Instead of `2020-1-2 1:20`, this function formats it as `2020-01-02 01:20`
*/
getDateTime (timestamp : Timestamp): string
/**
* Returns the timestamp set to the next day, updating month and year if needed
* @param timestamp A timestamp object
* @returns A timestamp object incremented to the next day
*/
nextDay (timestamp : Timestamp): Timestamp
/**
* Returns the timestamp set to the previous day, updating month and year if needed
* @param timestamp A timestamp object
* @returns A timestamp object decremented to the next day
*/
prevDay (timestamp : Timestamp): Timestamp
/**
* Returns the timestamp set to the relative day
* @param timestamp A timestamp object
* @param mover A reference that points to a function that handles the relative movement from one date to another. If moving backwards, specify `prevDay`
* @param days The number of days to move
* @param allowedWeekdays The allow weekdays to use. The method uses this information for allowed days
* @returns A timestamp object moved to the relatively specified days against the `allowedWeekdays`
*/
relativeDays (timestamp : Timestamp, mover? : TimestampMoveOperation, days? : number, allowedWeekdays? : NumberArray): Timestamp
/**
* Returns the timestamp set to the relative day, takes into account allowed weekdays
* @param timestamp A timestamp object
* @param mover A reference that points to a function that handles the relative movement from one date to another. If moving backwards, specify `prevDay`
* @param days The number of days to move
* @param allowedWeekdays The allow weekdays to use. The method uses this information for allowed days
* @returns A timestamp object moved to the relatively specified days against the `allowedWeekdays`
*/
moveRelativeDays (timestamp : Timestamp, mover? : TimestampMoveOperation, days? : number, allowedWeekdays? : NumberArray): Timestamp
/**
* Returns the timestamp associated to the specified weekday. Use `parseTimestamp`, not `parsed` (or manually call `updateFormatted` before calling this method), so associated fields are updated correctly, otherwise this function will not work as expected.
* @param timestamp A timestamp object
* @param mover A reference that points to a function that handles the relative movement from one date to another. If moving backwards, specify `prevDay`
* @param maxDays The maxiumum number of days to move
* @returns A timestamp object moved to the specified days relatively against the `maxDays`
*/
findWeekday (timestamp : Timestamp, mover? : TimestampMoveOperation, maxDays? : number): Timestamp
/**
* Returns the weekday skips in an array of 0's (off) and 1's (on). Basically, can convert `[1,2,3,4,5]` to `[0,1,1,1,1,1,0]`
* @param weekdays The normal weekdays array looks like this `[0,1,2,3,4,5,6]` where 0=Sunday, 1=Monday, etc. A week that starts on Monday, would look like this: `[1,2,3,4,5,6,0]` and a 5-day workweek would look like this: `[1,2,3,4,5]`
* @returns An array of 7 (representing a week) of 0's (hidden) and 1's (displayed)
*/
getWeekdaySkips (weekdays : NumberArray): NumberArray
/**
* Returns an array of timestamps
* @param start A timestamp object
* @param end A timestamp object
* @param now A timestamp object
* @param weekdaySkips An array of 7 numbers (representing 7 days of the week) that are either a 1 or 0
* @param disabledBefore A date in the form `YYYY-MM-DD` where all dates before, and including, will be disabled
* @param disabledAfter A date in the form `YYYY-MM-DD` where all dates after, and including, will be disabled
* @param disabledWeekdays An array of numbers representing the weekdays, where 0=Sunday to 6=Saturday
* @param disabledDays An array of string dates in the form `YYYY-MM-DD` that representing disabled days
* @param max Maximum days required. 42 is the maxiumum number of days in a full calendar month (6 rows) with `outside` days
* @param min Minimum days required
* @returns An array of timestamp objects for all days that meet the criteria
*/
createDayList (start : Timestamp, end : Timestamp, now : Timestamp, weekdaySkips : NumberArray, disabledBefore? : string, disabledAfter? : string, disabledWeekdays? : NumberArray, disabledDays? : StringArray, max? : number, min? : number): TimestampArray
/**
* Returns an array of intervals
* @param timestamp A timestamp object representing the day for the intervals
* @param first The first interval
* @param minutes The number of minutes in an interval
* @param count The count of intervals requested
* @param now A timestamp object that represents 'today' or a specified point in time
* @returns A array of interval objects (timestamps with time) that meet the criteria
*/
createIntervalList (timestamp : Timestamp, first : number, minutes : number, count : number, now : Timestamp): TimestampArray
/**
* Returns a function to be used for international date formatting purposes
* @param local A string representing the locale to use (ie: en-us for America)
* @param getOptions A function that passes the timestamp and a boolean
* @returns The output of the operation
*/
createNativeLocaleFormatter (local : string, getOptions : TimestampFormatOptions): string
/**
* Validates that input is a number
* @param input A numeric value
* @returns true if a number, otherwise false
*/
validateNumber (input : number | string): boolean
/**
* Checks passed timestamp is between start and end timestamps
* @param timestamp A timestamp object
* @param startTimestamp The starting timestamp object to use for the comparison
* @param endTimestamp The ending timestamp object to use for the comparison
* @param useTime [Optional] Use time in the comparison
* @returns true if a date is between the start and end dates
*/
isBetweenDates (timestamp : Timestamp, startTimestamp : Timestamp, endTimestamp : Timestamp, useTime? : boolean): boolean
/**
* Checks passed start and end timestamps overlap the first and last timestamps. This method can be used to find if an event, with start and end dates overlap a range, like a week
* @param startTimestamp The starting timestamp object to use for the comparison
* @param endTimestamp The ending timestamp object to use for the comparison
* @param firstTimestamp The first timestamp object to use for the comparison (typically the first day in a week)
* @param lastTimestamp The last timestamp object to use for the comparison (typically the last day in a week)
* @returns true if the start and end timestamps overlap the first and last timestamps
*/
isOverlappingDates (startTimestamp : Timestamp, endTimestamp : Timestamp, firstTimestamp : Timestamp, lastTimestamp : Timestamp): boolean
/**
* Returns the number days between two timestamps
* @param startTimestamp The starting timestamp object to use for the comparison
* @param endTimestamp The ending timestamp object to use for the comparison
* @returns The number of days beween the two timestamps
*/
daysBetween (startTimestamp : Timestamp, endTimestamp : Timestamp): number
/**
* Returns the number weeks between two timestamps
* @param startTimestamp The starting timestamp object to use for the comparison
* @param endTimestamp The ending timestamp object to use for the comparison
* @returns The number of weeks beween the two timestamps
*/
weeksBetween (startTimestamp : Timestamp, endTimestamp : Timestamp): number
/**
* Takes a timestamp and increments/decrements based on options
* @param timestamp A timestamp object
* @param options The options passed to the method. All items are optional and can be positive or negative
* @returns A copy of the modified timestamp object with the applied options
*/
addToDate (timestamp : Timestamp, options : AddToDateOptions): Timestamp
}
/**
* Returns today's date in YYYY-MM-DD format
* @returns Returns today's date in YYYY-MM-DD format
*/
export function today (): string
/**
* Returns the start of the week based on the passed in arguments
* @param timestamp A timestamp object
* @param weekdays The normal weekdays array looks like this `[0,1,2,3,4,5,6]` where 0=Sunday, 1=Monday, etc. A week that starts on Monday, would look like this: `[1,2,3,4,5,6,0]` and a 5-day workweek would look like this: `[1,2,3,4,5]`
* @param today A timestamp object that represents 'today' or a specified point in time. If passed in, then the relative information to the start-of-week timestamp object will be updated
* @returns A timestamp object representing the start of the week
*/
export function getStartOfWeek (timestamp : Timestamp, weekdays? : NumberArray, today? : Timestamp): Timestamp
/**
* Returns the end of the week based on the passed in arguments
* @param timestamp A timestamp object
* @param weekdays The normal weekdays array looks like this `[0,1,2,3,4,5,6]` where 0=Sunday, 1=Monday, etc. A week that starts on Monday, would look like this: `[1,2,3,4,5,6,0]` and a 5-day workweek would look like this: `[1,2,3,4,5]`
* @param today A timestamp object that represent 'today' or a specified point in time. If passed in, then the relative information to the end-of-week timestamp object will be updated
* @returns A timestamp object representing the end of the week
*/
export function getEndOfWeek (timestamp : Timestamp, weekdays? : NumberArray, today? : Timestamp): Timestamp
/**
* Returns the start of the month based on the passed in timestamp object
* @param timestamp A timestamp object
* @returns A timestamp object representing the start of the month
*/
export function getStartOfMonth (timestamp : Timestamp): Timestamp
/**
* Returns the end of the month based on the passed in timestamp object
* @param timestamp A timestamp object
* @returns A timestamp object representing the end of the month
*/
export function getEndOfMonth (timestamp : Timestamp): Timestamp
/**
* Parses the passed in value and returns the number of minutes since midnight
* @param input Value may be a Number (minutes since midnight) or String (hh:mm:ss where seconds are optional) or Object (must have keys **hour** and **minute**)
* @returns The number of minutes since midnight
*/
export function parseTime (input : TimeObjectOrNumberOrString): number
/**
* Validates the passed in date/time string (YYYY-MM-DD hh:mm:ss)
* @param input A date/time string in the form `YYYY-MM-DD hh:mm:ss` (seconds are optional)
* @returns True if the passed in date/time string is of correct form
*/
export function validateTimestamp (input : string): boolean
/**
* Parses a date/time string to a simple timestamp object. For a more complete timestamp, use parseTimestamp
* @param input A date/time string in the form `YYYY-MM-DD hh:mm:ss` (seconds are optional)
* @returns A timestamp object based on the passed in argument. Returns 'null' on error
*/
export function parsed (input : string): TimestampOrNull
/**
* Parses a date/time string to the timestamp object. Very similar to the `parsed` method, except also updates timestamp with formatted and relative information
* @param input A date/time string in the form `YYYY-MM-DD hh:mm:ss` (seconds are optional)
* @returns A timestamp object based on the passed in argument. Returns 'null' on error
*/
export function parseTimestamp (input : string): TimestampOrNull
/**
* Parses a JavaScript Date object to the timestamp object
* @param input A JavaScript Date object
* @returns A formatted timestamp object based on the passed in argument (see updateFormatted)
*/
export function parseDate (input : Date): TimestampOrNull
/**
* Takes a timestamp and returns a JavaScript Date with time set to 00:00
* @param timestamp A timestamp object
* @returns The returned value is a JavaScript Date
*/
export function makeDate (timestamp : Timestamp): Date
/**
* Takes a timestamp and returns a JavaScript Date
* @param timestamp A timestamp object
* @returns The returned value is a JavaScript Date
*/
export function makeDateTime (timestamp : Timestamp): Date
/**
* Turns passed in timestamp object to a day identifier
* @param timestamp A timestamp object
* @returns The returned number is in a number representing `YYYYMMdd`
*/
export function getDayIdentifier (timestamp : Timestamp): number
/**
* Turns passed in timestamp object to a time identifier
* @param timestamp A timestamp object
* @returns The returned number is in a number representing `hhmm`
*/
export function getTimeIdentifier (timestamp : Timestamp): number
/**
* Turns passed in timestamp object to a date/time identifier
* @param timestamp A timestamp object
* @returns The returned number is in a number representing `YYYYMMddhhmm`
*/
export function getDayTimeIdentifier (timestamp : Timestamp): number
/**
* Returns the number of milliseconds between the two days
* @param timestamp1 A timestamp object
* @param timestamp2 A timestamp object
* @param strict If true, then negative values are not allowed
* @returns The number of milliseconds between the two timestamp objects. 0 if **strict** is true and the value would be negative
*/
export function diffTimestamp (timestamp1 : Timestamp, timestamp2 : Timestamp, strict : boolean): number
/**
* Updates the relative information in the timestamp object. The relative information includes, compared to the **now** object, `past`, `current` and `future` booleans
* @param timestamp A timestamp object
* @param now A timestamp object representing a **now** time (fixed point in time -- usually **today**)
* @param time If true, also uses time to adjust the relative information
* @returns A timestamp object
*/
export function updateRelative (timestamp : Timestamp, now : Timestamp, time? : boolean): Timestamp
/**
* Updates the timestamp object with the passed in minutes
* @param timestamp A timestamp object
* @param minutes The number of minutes since midnight
* @param now A timestamp object, if set, used to adjust the relative information
* @returns A timestamp object
*/
export function updateMinutes (timestamp : Timestamp, minutes : number, now? : Timestamp): Timestamp
/**
* Updates the timestamp object with the weekday information
* @param timestamp A timestamp object
* @returns A timestamp object
*/
export function updateWeekday (timestamp : Timestamp): Timestamp
/**
* Updates the timestamp object with the doy (day of year) information
* @param timestamp A timestamp object
* @returns A timestamp object
*/
export function updateDayOfYear (timestamp : Timestamp): Timestamp
/**
* Updates the timestamp object with the workweek (work week) information
* @param timestamp A timestamp object
* @returns A timestamp object
*/
export function updateWorkWeek (timestamp : Timestamp): Timestamp
/**
* Updates the timestamp object to be disabled if it matches one of the items from `disabledDays`
* @param timestamp A timestamp object
* @param disabledBefore A date in the form `YYYY-MM-DD` where all dates before, and including, will be disabled
* @param disabledAfter A date in the form `YYYY-MM-DD` where all dates after, and including, will be disabled
* @param disabledWeekdays An array of numbers representing the weekdays, where 0=Sunday to 6=Saturday
* @param disabledDays An array of disabled days. If an array is contained within the array with a start and end date, it will be treated as a range
* @returns A timestamp object with `timestamp.disabled` true if a match was found
*/
export function updateDisabled (timestamp : Timestamp, disabledBefore? : string, disabledAfter? : string, disabledWeekdays? : NumberArray, disabledDays? : StringArray): Timestamp
/**
* Updates the timestamp object with formatted information (`time`, `date`, `weekday`, `doy` and `workweek`)
* @param timestamp A timestamp object
* @returns A timestamp object
*/
export function updateFormatted (timestamp : Timestamp): Timestamp
/**
* Returns the doy (day of year) for an unformatted timestamp
* @param timestamp A timestamp object
* @returns The day of the year
*/
export function getDayOfYear (timestamp : Timestamp): number
/**
* Returns the workweek (work week number) for an unformatted timestamp
* @param timestamp A timestamp object. If no timestamp is passed, then uses current date
* @returns The work week number of the year. If passed an invalid date, the return value is always 0
*/
export function getWorkWeek (timestamp? : Timestamp): number
/**
* Returns the weekday (day of the week) for an unformatted timestamp
* @param timestamp A timestamp object
* @returns The week day number (0=Sunday, 1=Monday, etc)
*/
export function getWeekday (timestamp : Timestamp): number
/**
* Returns true if the passed in year is a leap year
* @param year A number representing the year in YYYY format
* @returns Returns true if the passed in year is a leap year
*/
export function isLeapYear (year : number): boolean
/**
* Returns number of days in the spefified month for the specified year (takes into account leap years)
* @param year A number representing the year in YYYY format
* @param month A number representing the month from 0 (January) to 11 (December). For performance reasons, no checking is done to validate this value is in range. An exception will occur if it is not
* @returns Returns true if the passed in year is a leap year
*/
export function daysInMonth (year : number, month : number): number
/**
* Makes a copy of the passed Timestamp
* @param timestamp A timestamp object
* @returns A copy of the passed in timestamp object
*/
export function copyTimestamp (timestamp : Timestamp): Timestamp
/**
* Compares two timestamps
* @param timestamp1 A timestamp object
* @param timestamp2 A timestamp object
* @returns true if timestamps are the same, otherwise false
*/
export function compareTimestamps (timestamp1 : Timestamp, timestamp2 : Timestamp): boolean
/**
* Compares two timestamps if the dates are the same
* @param timestamp1 A timestamp object
* @param timestamp2 A timestamp object
* @returns true if timestamps dates are the same, otherwise false
*/
export function compareDate (timestamp1 : Timestamp, timestamp2 : Timestamp): boolean
/**
* Compares two timestamps if the times are the same
* @param timestamp1 A timestamp object
* @param timestamp2 A timestamp object
* @returns true if timestamps times are the same, otherwise false
*/
export function compareTime (timestamp1 : Timestamp, timestamp2 : Timestamp): boolean
/**
* Compares two timestamps if the dates and times are the same
* @param timestamp1 A timestamp object
* @param timestamp2 A timestamp object
* @returns true if timestamps dates and times are the same, otherwise false
*/
export function compareDateTime (timestamp1 : Timestamp, timestamp2 : Timestamp): boolean
/**
* Pads the passed in number to the specfied length. Passing in `(2,2)` returns `02`
* @param x The number to pad
* @param length The length of the paddedIng
* @returns A padded value
*/
export function padNumber (x : number, length : number): string
/**
* Returns the timestamp as a padded date
* @param timestamp A timestamp object
* @returns A date as a padded value in the form `YYYY-MM-DD`. Instead of `2020-1-2`, this function formats it as `2020-01-02`
*/
export function getDate (timestamp : Timestamp): string
/**
* Returns the timestamp as a padded time
* @param timestamp A timestamp object
* @returns A time as a padded value in the form `hh:mm`. Instead of `2:3`, this function formats it as `02:03`
*/
export function getTime (timestamp : Timestamp): string
/**
* Returns the timestamp as a padded date and time. If time is not available, then only the date will be used
* @param timestamp A timestamp object
* @returns A date and time as a padded value in the form `YYYY-MM-DD hh:mm`. Instead of `2020-1-2 1:20`, this function formats it as `2020-01-02 01:20`
*/
export function getDateTime (timestamp : Timestamp): string
/**
* Returns the timestamp set to the next day, updating month and year if needed
* @param timestamp A timestamp object
* @returns A timestamp object incremented to the next day
*/
export function nextDay (timestamp : Timestamp): Timestamp
/**
* Returns the timestamp set to the previous day, updating month and year if needed
* @param timestamp A timestamp object
* @returns A timestamp object decremented to the next day
*/
export function prevDay (timestamp : Timestamp): Timestamp
/**
* Returns the timestamp set to the relative day
* @param timestamp A timestamp object
* @param mover A reference that points to a function that handles the relative movement from one date to another. If moving backwards, specify `prevDay`
* @param days The number of days to move
* @param allowedWeekdays The allow weekdays to use. The method uses this information for allowed days
* @returns A timestamp object moved to the relatively specified days against the `allowedWeekdays`
*/
export function relativeDays (timestamp : Timestamp, mover? : TimestampMoveOperation, days? : number, allowedWeekdays? : NumberArray): Timestamp
/**
* Returns the timestamp set to the relative day, takes into account allowed weekdays
* @param timestamp A timestamp object
* @param mover A reference that points to a function that handles the relative movement from one date to another. If moving backwards, specify `prevDay`
* @param days The number of days to move
* @param allowedWeekdays The allow weekdays to use. The method uses this information for allowed days
* @returns A timestamp object moved to the relatively specified days against the `allowedWeekdays`
*/
export function moveRelativeDays (timestamp : Timestamp, mover? : TimestampMoveOperation, days? : number, allowedWeekdays? : NumberArray): Timestamp
/**
* Returns the timestamp associated to the specified weekday. Use `parseTimestamp`, not `parsed` (or manually call `updateFormatted` before calling this method), so associated fields are updated correctly, otherwise this function will not work as expected.
* @param timestamp A timestamp object
* @param mover A reference that points to a function that handles the relative movement from one date to another. If moving backwards, specify `prevDay`
* @param maxDays The maxiumum number of days to move
* @returns A timestamp object moved to the specified days relatively against the `maxDays`
*/
export function findWeekday (timestamp : Timestamp, mover? : TimestampMoveOperation, maxDays? : number): Timestamp
/**
* Returns the weekday skips in an array of 0's (off) and 1's (on). Basically, can convert `[1,2,3,4,5]` to `[0,1,1,1,1,1,0]`
* @param weekdays The normal weekdays array looks like this `[0,1,2,3,4,5,6]` where 0=Sunday, 1=Monday, etc. A week that starts on Monday, would look like this: `[1,2,3,4,5,6,0]` and a 5-day workweek would look like this: `[1,2,3,4,5]`
* @returns An array of 7 (representing a week) of 0's (hidden) and 1's (displayed)
*/
export function getWeekdaySkips (weekdays : NumberArray): NumberArray
/**
* Returns an array of timestamps
* @param start A timestamp object
* @param end A timestamp object
* @param now A timestamp object
* @param weekdaySkips An array of 7 numbers (representing 7 days of the week) that are either a 1 or 0
* @param disabledBefore A date in the form `YYYY-MM-DD` where all dates before, and including, will be disabled
* @param disabledAfter A date in the form `YYYY-MM-DD` where all dates after, and including, will be disabled
* @param disabledWeekdays An array of numbers representing the weekdays, where 0=Sunday to 6=Saturday
* @param disabledDays An array of string dates in the form `YYYY-MM-DD` that representing disabled days
* @param max Maximum days required. 42 is the maxiumum number of days in a full calendar month (6 rows) with `outside` days
* @param min Minimum days required
* @returns An array of timestamp objects for all days that meet the criteria
*/
export function createDayList (start : Timestamp, end : Timestamp, now : Timestamp, weekdaySkips : NumberArray, disabledBefore? : string, disabledAfter? : string, disabledWeekdays? : NumberArray, disabledDays? : StringArray, max? : number, min? : number): TimestampArray
/**
* Returns an array of intervals
* @param timestamp A timestamp object representing the day for the intervals
* @param first The first interval
* @param minutes The number of minutes in an interval
* @param count The count of intervals requested
* @param now A timestamp object that represents 'today' or a specified point in time
* @returns A array of interval objects (timestamps with time) that meet the criteria
*/
export function createIntervalList (timestamp : Timestamp, first : number, minutes : number, count : number, now : Timestamp): TimestampArray
/**
* Returns a function to be used for international date formatting purposes
* @param local A string representing the locale to use (ie: en-us for America)
* @param getOptions A function that passes the timestamp and a boolean
* @returns The output of the operation
*/
export function createNativeLocaleFormatter (local : string, getOptions : TimestampFormatOptions): string
/**
* Validates that input is a number
* @param input A numeric value
* @returns true if a number, otherwise false
*/
export function validateNumber (input : number | string): boolean
/**
* Checks passed timestamp is between start and end timestamps
* @param timestamp A timestamp object
* @param startTimestamp The starting timestamp object to use for the comparison
* @param endTimestamp The ending timestamp object to use for the comparison
* @param useTime [Optional] Use time in the comparison
* @returns true if a date is between the start and end dates
*/
export function isBetweenDates (timestamp : Timestamp, startTimestamp : Timestamp, endTimestamp : Timestamp, useTime? : boolean): boolean
/**
* Checks passed start and end timestamps overlap the first and last timestamps. This method can be used to find if an event, with start and end dates overlap a range, like a week
* @param startTimestamp The starting timestamp object to use for the comparison
* @param endTimestamp The ending timestamp object to use for the comparison
* @param firstTimestamp The first timestamp object to use for the comparison (typically the first day in a week)
* @param lastTimestamp The last timestamp object to use for the comparison (typically the last day in a week)
* @returns true if the start and end timestamps overlap the first and last timestamps
*/
export function isOverlappingDates (startTimestamp : Timestamp, endTimestamp : Timestamp, firstTimestamp : Timestamp, lastTimestamp : Timestamp): boolean
/**
* Returns the number days between two timestamps
* @param startTimestamp The starting timestamp object to use for the comparison
* @param endTimestamp The ending timestamp object to use for the comparison
* @returns The number of days beween the two timestamps
*/
export function daysBetween (startTimestamp : Timestamp, endTimestamp : Timestamp): number
/**
* Returns the number weeks between two timestamps
* @param startTimestamp The starting timestamp object to use for the comparison
* @param endTimestamp The ending timestamp object to use for the comparison
* @returns The number of weeks beween the two timestamps
*/
export function weeksBetween (startTimestamp : Timestamp, endTimestamp : Timestamp): number
/**
* Takes a timestamp and increments/decrements based on options
* @param timestamp A timestamp object
* @param options The options passed to the method. All items are optional and can be positive or negative
* @returns A copy of the modified timestamp object with the applied options
*/
export function addToDate (timestamp : Timestamp, options : AddToDateOptions): Timestamp

@@ -702,3 +698,3 @@ export interface AddToDateOptions {

import { NumberArray, StringArray, ResourceObjectArray, ColumnObjectArray, TimeObjectOrNumberOrString, TimestampOrNull, TimestampMoveOperation, TimestampArray, TimestampFormatOptions } from './types'
import { Timestamp, NumberArray, StringArray, ResourceObjectArray, ColumnObjectArray, TimeObjectOrNumberOrString, TimestampOrNull, TimestampMoveOperation, TimestampArray, TimestampFormatOptions } from './types'

@@ -712,5 +708,3 @@ declare module 'vue/types/vue' {

export as namespace QCalendar
export as namespace Timestamp
export const QCalendar: VueConstructor<QCalendar>
export const Timestamp: Timestamp
{
"name": "@quasar/quasar-ui-qcalendar",
"version": "3.2.0",
"version": "3.2.1",
"author": "Jeff Galbraith <jeff@quasar.dev>",

@@ -62,3 +62,3 @@ "description": "QCalendar - Day/Month/Week Calendars, Popups, Date Pickers, Schedules, Agendas and Planners for your Quasar Apps",

"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^10.0.0",
"@rollup/plugin-node-resolve": "^11.0.0",
"@vue/eslint-config-standard": "^5.1.2",

@@ -89,7 +89,7 @@ "autoprefixer": "^10.0.4",

"quasar": "^1.14.5",
"quasar-json-api": "^1.2.3",
"quasar-json-api": "^1.2.4",
"rimraf": "^3.0.2",
"rollup": "^2.34.0",
"rollup-plugin-vue": "=6.0.0",
"rtlcss": "^2.6.1",
"rtlcss": "^2.6.2",
"sass": "^1.29.0",

@@ -96,0 +96,0 @@ "uglify-es": "^3.3.9",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display