Date and Time

Previous  Terms  Next

TinkerPlots_logoV2-rgb


Date and Time

date

date(year, month, day) takes its three arguments and returns a date. The month and day arguments are optional.

Example: date(1777, 4, 7) returns April 7, 1977.

dayOfMonth

dayOfMonth(date) returns the day of the month corresponding to the given date.

Example: If date is Aug, 31, 2005, dayOfMonth(date) returns 31.

dayOfWeek

dayOfWeek(date) returns the day of the week (as a number) corresponding to the given date.

Example: If date is Aug, 31, 2005, dayOfWeek(date) returns 4 because Aug, 31, 2005 is a Wednesday.

dayOfWeekName

dayOfWeekName(date) returns the short name of the day of the week corresponding to the given date.

Example: If date is Aug, 31, 2005, dayofWeekName(date) returns "Wed".

dayOfYear

dayOfYear(date) returns the day of the year corresponding to the given date.

Example: If date is Aug, 31, 2005, dayOfYear(date) returns 243 because Aug, 31 is the 243 day of 2005.

hour

hour(date_time) returns the hour (in 24 hour time) corresponding to the given date_time.

Example: If date_time is 3:30 PM on Aug, 31, 2005, hour(date_time) returns 15.

minute

minute(date_time) returns the minute corresponding to the given date_time.

Example: If date_time is 3:30 PM on Aug 31, 2005, minute(date_time) returns 30.

month

month(date) returns the number of the month corresponding to the given date.

Example: If date is Aug, 31, 2005, month(date) returns 8.

monthName

monthName(date) returns the short name of the month corresponding to the given date.

Example: If date is Aug, 31, 2005, dayOfMonth(date) returns "Aug".

now

now( ) returns the current date and time as determined by the computer.

second

second(date_time) returns the second corresponding to the given date_time.

Example: If date_time is 3:30:05 PM on Aug, 31, 2005, second(date_time) returns 5.

stringToDateTime

stringToDateTime(date-time-string) attempts to form a date-time from the given string as though it were typed in.

ticks

ticks( ) returns the current number of 60ths of a second since the computer was last turned on.

today

today( ) returns the current date as determined by the computer

year

year(date) returns the year corresponding to the given date.

Example: If date is Aug, 31, 2005, year(date) returns 2005.


TinkerPlots Help

© 2012 Clifford Konold and Craig D. Miller