Difference between revisions of "$time"

From Scriptwiki
Jump to: navigation, search
 
m
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
Returns the current time in hour:minute:second format.
+
Returns the current time in hour:minute:second format, or whatever format specified.
  
  $time
+
  $time(format)
  
* This identifier has no parameters or properties.
+
* Used without any ''format'' specified, it will return in the ''HH:nn:ss'' format.
 +
* For details on what to use as ''format'' see [[:Category:Time and Date Identifiers|Time and Date Identifiers]]
  
 
== Example ==
 
== Example ==
  
 
  $time  ;returned ''11:50:34'' just now
 
  $time  ;returned ''11:50:34'' just now
 +
$time(yyyy)  ;returned ''2005'' just now
 +
$time(HH:nn dddd dd/mm/yyyy)  ;returned ''11:50 Saturday 26/11/2005'' just now
  
 
== See Also ==
 
== See Also ==
 
+
* [[$asctime]] and [[$ctime]] is often used for more detailed date/time information.
[[$asctime]] and [[$ctime]] is often used for more detailed date/time information.
 
  
 
[[Category:Time and Date Identifiers]]
 
[[Category:Time and Date Identifiers]]

Latest revision as of 11:23, 2 July 2007

Returns the current time in hour:minute:second format, or whatever format specified.

$time(format)
  • Used without any format specified, it will return in the HH:nn:ss format.
  • For details on what to use as format see Time and Date Identifiers

Example

$time  ;returned 11:50:34 just now
$time(yyyy)  ;returned 2005 just now
$time(HH:nn dddd dd/mm/yyyy)  ;returned 11:50 Saturday 26/11/2005 just now

See Also

  • $asctime and $ctime is often used for more detailed date/time information.