Difference between revisions of "GetTime Command"

From GeoGebra Manual
Jump to: navigation, search
m (make-up :italics and example tag)
Line 5: Line 5:
 
: milliseconds, seconds, minutes, hours (0-23), date, month (1-12), year, month (as text), day (as text), day (1 = Sunday, 2 = Monday, etc)
 
: milliseconds, seconds, minutes, hours (0-23), date, month (1-12), year, month (as text), day (as text), day (1 = Sunday, 2 = Monday, etc)
 
{{betamanual|version=4.2|
 
{{betamanual|version=4.2|
{{Note|1=From GeoGebra 4.2, this syntax will work too: GetTime[ <Format> ] where Format is a Text. Any of the following characters when prefixed by a backslash (\) will be replaced (as explained here http://php.net/manual/en/function.date.php) d, D, j, l, N, S, w, z, W, F, m, M, n, t, L, Y, y, a, A,  g, G, h, H, i, s, U. For example <code>GetTime["The date is \l the \j\S of \F \Y"]</code> might give "The date is Thursday the 5th of July 2012"}}
+
{{Note|1=From GeoGebra 4.2, this syntax will work too: GetTime[ <Format> ] where ''Format'' is a Text. Any of the following characters when prefixed by a backslash (\) will be replaced (as explained here http://php.net/manual/en/function.date.php) d, D, j, l, N, S, w, z, W, F, m, M, n, t, L, Y, y, a, A,  g, G, h, H, i, s, U.  
 +
{{Example|1= <code>GetTime["The date is \l the \j\S of \F \Y"]</code> might give "The date is Thursday the 5th of July 2012"}}}}
 
}}
 
}}

Revision as of 10:03, 8 July 2012



GetTime[]
Returns a list such as {647, 59, 39, 23, 28, 2, 2011, "February", "Monday", 2}, ie the current time and date in this order:
milliseconds, seconds, minutes, hours (0-23), date, month (1-12), year, month (as text), day (as text), day (1 = Sunday, 2 = Monday, etc)
© 2024 International GeoGebra Institute