RQBDateTimeLibraryAPI
Defined in: datetime/src/types.ts:57
Properties
format()
format: (
d
:DateOrString
,fmt
:string
) =>string
Defined in: datetime/src/types.ts:61
Formats a date as a string.
Parameters
Parameter | Type |
---|---|
d | DateOrString |
fmt | string |
Returns
string
isAfter()
isAfter: (
a
:DateOrString
,b
:DateOrString
) =>boolean
Defined in: datetime/src/types.ts:70
Determines whether the first date is after the second date.
Parameters
Parameter | Type |
---|---|
a | DateOrString |
b | DateOrString |
Returns
boolean
isBefore()
isBefore: (
a
:DateOrString
,b
:DateOrString
) =>boolean
Defined in: datetime/src/types.ts:74
Determines whether the first date is before the second date.
Parameters
Parameter | Type |
---|---|
a | DateOrString |
b | DateOrString |
Returns
boolean
isSame()
isSame: (
a
:DateOrString
,b
:DateOrString
) =>boolean
Defined in: datetime/src/types.ts:83
Determines whether the first date is the same as the second date.
If either the first date or the second date is a string in the format 'YYYY-MM-DD', then the dates will only be compared at the date level (no time component). Otherwise, they will be compared to the millisecond.
Parameters
Parameter | Type |
---|---|
a | DateOrString |
b | DateOrString |
Returns
boolean
isValid()
isValid: (
d
:DateOrString
) =>boolean
Defined in: datetime/src/types.ts:88
Determines whether the date is either a valid Date
object or an
ISO 8601-formatted string representing a valid date.
Parameters
Parameter | Type |
---|---|
d | DateOrString |
Returns
boolean
toDate()
toDate: (
d
:DateOrString
) =>Date
Defined in: datetime/src/types.ts:92
Converts a string to a Date
object or returns a valid Date
as is.
Parameters
Parameter | Type |
---|---|
d | DateOrString |
Returns
Date
toISOString()
toISOString: (
d
:DateOrString
) =>string
Defined in: datetime/src/types.ts:99
Converts a Date
or ISO 8601-formatted string into a full ISO 8601 UTC
string, in the format 'YYYY-MM-DDTHH:mm:ss.SSSZ' (the "T" and "Z" are
static; other parts represent standard time units, increasing in precision
from left to right).
Parameters
Parameter | Type |
---|---|
d | DateOrString |
Returns
string
toISOStringDateOnly()
toISOStringDateOnly: (
d
:DateOrString
) =>string
Defined in: datetime/src/types.ts:66
Formats a date as an ISO 8601 string, only including the year, month, and day ('YYYY-MM-DD').
Parameters
Parameter | Type |
---|---|
d | DateOrString |
Returns
string
API documentation is generated from the latest commit on the main
branch. It may be somewhat inconsistent with official releases of React Query Builder.