Difference between revisions of "GetTime Command"
From GeoGebra Manual
m (Text replace - "<div class="box info"> 48px|left This page is part of the official manual for print and pdf. For structural reasons normal users can't edit this page. If you found any errors on this page please contact ) |
(command syntax: changed [ ] into ( )) |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | <noinclude>{{Manual Page|version= | + | <noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|scripting}} |
− | {{command|scripting}} | + | ;GetTime() |
− | ;GetTime | ||
: Returns a list with the current time and date in this order: | : Returns a list with 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) | : milliseconds, seconds, minutes, hours (0-23), date, month (1-12), year, month (as text), day (as text), day (1 = Sunday, 2 = Monday, etc) | ||
:{{example|1= | :{{example|1= | ||
− | <code>GetTime | + | <code>GetTime()</code> returns a list such as ''{647, 59, 39, 23, 28, 2, 2011, "February", "Monday", 2}''. |
}} | }} | ||
− | ;GetTime | + | ;GetTime( "<Format>" ) |
− | : | + | :Creates a text using ''Format'' as a template replacing any of the following characters when prefixed by a backslash (\): |
: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 - the explanation to these characters are 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 - the explanation to these characters are here http://php.net/manual/en/function.date.php | ||
− | :{{Example|1= <code>GetTime | + | :{{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''}}. |
Latest revision as of 08:56, 12 October 2017
- GetTime()
- Returns a list with 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)
- Example:
GetTime()
returns a list such as {647, 59, 39, 23, 28, 2, 2011, "February", "Monday", 2}.
- GetTime( "<Format>" )
- Creates a text using Format as a template replacing any of the following characters when prefixed by a backslash (\):
- 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 - the explanation to these characters are here http://php.net/manual/en/function.date.php
- Example:
GetTime("The date is \l the \j\S of \F \Y")
might give The date is Thursday the 5th of July 2012
.