CodeQL library for Rust
codeql/rust-all 0.1.15-dev (changelog, source)
Search

Primitive type date

The primitive type of dates (and optionally times).

Predicates

daysTo

Returns the number of days between the receiver and the argument - the result is positive when the argument is chronologically ahead of the receiver, and negative when the argument is chronologically behind the receiver

getDay

Returns the day of the month of the receiver (1 through 31)

getHours

Returns the hours component of the receiver (0 through 23)

getMinutes

Returns the minutes component of the receiver (0 through 59)

getMonth

Returns the month component of the receiver (β€œJanuary”, β€œFebruary”, β€œMarch”, β€œApril”, β€œMay”, β€œJune”, β€œJuly”, β€œAugust”, β€œSeptember”, β€œOctober”, β€œNovember”, or β€œDecember”)

getSeconds

Returns the seconds component of the receiver (0 through 60)

getYear

Returns the year component of the receiver (for example 2017)

toISO

Returns a string representation of the receiver (for example β€œ2017-08-25 12:29:39”)

toString

Returns a string representation of the receiver (for example β€œ12 January 2017 05:45”)