RQBDateTimeLibraryAPI
Properties
format()
format: (
d
:DateOrString
,fmt
:string
) =>string
Formats a date as a string.
Parameters
Parameter | Type |
---|---|
d | DateOrString |
fmt | string |
Returns
string
Defined in
isAfter()
isAfter: (
a
:DateOrString
,b
:DateOrString
) =>boolean
Determines whether the first date is after the second date.
Parameters
Parameter | Type |
---|---|
a | DateOrString |
b | DateOrString |
Returns
boolean
Defined in
isBefore()
isBefore: (
a
:DateOrString
,b
:DateOrString
) =>boolean
Determines whether the first date is before the second date.
Parameters
Parameter | Type |
---|---|
a | DateOrString |
b | DateOrString |
Returns
boolean
Defined in
isSame()
isSame: (
a
:DateOrString
,b
:DateOrString
) =>boolean
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
Defined in
isValid()
isValid: (
d
:DateOrString
) =>boolean
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
Defined in
toDate()
toDate: (
d
:DateOrString
) =>Date
Converts a string to a Date
object or returns a valid Date
as is.
Parameters
Parameter | Type |
---|---|
d | DateOrString |
Returns
Date
Defined in
toISOString()
toISOString: (
d
:DateOrString
) =>string
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
Defined in
toISOStringDateOnly()
toISOStringDateOnly: (
d
:DateOrString
) =>string
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
Defined in
API documentation is generated from the latest commit on the main
branch. It may be somewhat inconsistent with official releases of React Query Builder.