ReferenceScript nodesMath › Date and Time
Get Time of Day
The time of day where the wallpaper is; weekday 0 is Sunday, Day Fraction goes from 0 at midnight to 1.
ƒGet Time of Day
Hour
Minute
Second
Day of Week
Day Fraction
Inputs
None.
Outputs
| Pin | Type |
|---|---|
Hourhours | number |
Minuteminutes | number |
Secondseconds | number |
Day of Weekweekday | number |
Day Fractionday | number |
The code it becomes
The graph below written as a script would write it.
// On Scene Startscene.log((new Date().getHours()));In a graph
◆On Scene Start
ƒGet Time of Day
Hour
Minute
Second
Day of Week
Day Fraction
ƒPrint
In Text
The node with what starts it and Print to show what it gives, as Studio draws them.
Related
Notes from the community
Written by creators and checked by the docs' editors. Not part of Motion's official reference.