day

hour

millis

minute

month

seconds

year

day

Arguments
[]
Docstring

Get the current day of the month (1 through 31).

Works only inside sketch functions?
No
Original Processing method
day()
Original p5js method
day()
Example
(q/background 255)
(q/fill 0)
; iterate through all time-related functions
; and print their values
(doseq [[ind capt fn] [[0 "millis" q/millis] [1 "seconds" q/seconds]
                       [2 "minute" q/minute] [3 "hour" q/hour] [4 "day" q/day]
                       [5 "month" q/month] [6 "year" q/year]]]
  (q/text (str capt " " (fn)) 10 (+ (* 20 ind) 20)))
try example

hour

Arguments
[]
Docstring

Returns the current hour as a value from 0 - 23.

Works only inside sketch functions?
No
Original Processing method
hour()
Original p5js method
hour()
Example
(q/background 255)
(q/fill 0)
; iterate through all time-related functions
; and print their values
(doseq [[ind capt fn] [[0 "millis" q/millis] [1 "seconds" q/seconds]
                       [2 "minute" q/minute] [3 "hour" q/hour] [4 "day" q/day]
                       [5 "month" q/month] [6 "year" q/year]]]
  (q/text (str capt " " (fn)) 10 (+ (* 20 ind) 20)))
try example

millis

Arguments
[]
Docstring

Returns the number of milliseconds (thousandths of a second) since starting the sketch. This information is often used for timing animation sequences.

Works only inside sketch functions?
Yes
Original Processing method
millis()
Original p5js method
millis()
Example
(q/background 255)
(q/fill 0)
; iterate through all time-related functions
; and print their values
(doseq [[ind capt fn] [[0 "millis" q/millis] [1 "seconds" q/seconds]
                       [2 "minute" q/minute] [3 "hour" q/hour] [4 "day" q/day]
                       [5 "month" q/month] [6 "year" q/year]]]
  (q/text (str capt " " (fn)) 10 (+ (* 20 ind) 20)))
try example

minute

Arguments
[]
Docstring

Returns the current minute as a value from 0 - 59

Works only inside sketch functions?
No
Original Processing method
minute()
Original p5js method
minute()
Example
(q/background 255)
(q/fill 0)
; iterate through all time-related functions
; and print their values
(doseq [[ind capt fn] [[0 "millis" q/millis] [1 "seconds" q/seconds]
                       [2 "minute" q/minute] [3 "hour" q/hour] [4 "day" q/day]
                       [5 "month" q/month] [6 "year" q/year]]]
  (q/text (str capt " " (fn)) 10 (+ (* 20 ind) 20)))
try example

month

Arguments
[]
Docstring

Returns the current month as a value from 1 - 12.

Works only inside sketch functions?
No
Original Processing method
month()
Original p5js method
month()
Example
(q/background 255)
(q/fill 0)
; iterate through all time-related functions
; and print their values
(doseq [[ind capt fn] [[0 "millis" q/millis] [1 "seconds" q/seconds]
                       [2 "minute" q/minute] [3 "hour" q/hour] [4 "day" q/day]
                       [5 "month" q/month] [6 "year" q/year]]]
  (q/text (str capt " " (fn)) 10 (+ (* 20 ind) 20)))
try example

seconds

Arguments
[]
Docstring

Returns the current second as a value from 0 - 59.

Works only inside sketch functions?
No
Original Processing method
second()
Original p5js method
second()
Example
(q/background 255)
(q/fill 0)
; iterate through all time-related functions
; and print their values
(doseq [[ind capt fn] [[0 "millis" q/millis] [1 "seconds" q/seconds]
                       [2 "minute" q/minute] [3 "hour" q/hour] [4 "day" q/day]
                       [5 "month" q/month] [6 "year" q/year]]]
  (q/text (str capt " " (fn)) 10 (+ (* 20 ind) 20)))
try example

year

Arguments
[]
Docstring

Returns the current year as an integer (2003, 2004, 2005, etc).

Works only inside sketch functions?
No
Original Processing method
year()
Original p5js method
year()
Example
(q/background 255)
(q/fill 0)
; iterate through all time-related functions
; and print their values
(doseq [[ind capt fn] [[0 "millis" q/millis] [1 "seconds" q/seconds]
                       [2 "minute" q/minute] [3 "hour" q/hour] [4 "day" q/day]
                       [5 "month" q/month] [6 "year" q/year]]]
  (q/text (str capt " " (fn)) 10 (+ (* 20 ind) 20)))
try example