DifferenceToString (UserStatistics function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
<span style="font-size:120%; color:black"><b>Longstring with difference of all Login statistic v</b></span>
{{Template:UserStatistics:DifferenceToString subtitle}}
[[Category:UserStatistics methods|DifferenceToString function]]
<!--DPL?? Category:UserStatistics methods|DifferenceToString function: Longstring with difference of all Login statistic v-->
<!--DPL?? Category:System methods|DifferenceToString (UserStatistics function): Longstring with difference of all Login statistic v-->
<p>
DifferenceToString is a member of the [[UserStatistics class]].
</p>
   
   
This method returns to a longstring the difference in values between one UserStatistics
This method returns to a longstring the difference in values between one UserStatistics
Line 12: Line 6:
   
   
See the description of [[UserStatistics class#login|Login statistics]].
See the description of [[UserStatistics class#login|Login statistics]].
===Syntax===
==Syntax==
  %ls = %ustat:DifferenceToString(%ustatOld [,&nbsp;Zeros=bool])
{{Template:UserStatistics:DifferenceToString syntax}}
===Syntax terms===
===Syntax terms===
<dl>
<dl>
Line 32: Line 26:
   
   
</dl>
</dl>
===Usage Notes===
==Usage notes==
<ul>
<ul>
<li>[[UserStatistics class#request|Request statistics]]
<li>[[UserStatistics class#request|Request statistics]]
Line 45: Line 39:
Login statistics.
Login statistics.
</ul>
</ul>
===Examples===
==Examples==
   
   
The following statement returns all the Login statistics that have
The following statement returns all the Login statistics that have
Line 52: Line 46:
<p class="code"><nowiki>Print %ustat2:differenceToString(%ustat1)
<p class="code"><nowiki>Print %ustat2:differenceToString(%ustat1)
</nowiki></p>
</nowiki></p>
==See also==
{{Template:UserStatistics:DifferenceToString footer}}

Revision as of 20:42, 14 March 2011

Login timestamps difference in string format (UserStatistics class)


This method returns to a longstring the difference in values between one UserStatistics object and another for all Login statistics with non-zero values (by default) or for all Login statistics (as an option).

See the description of Login statistics.

Syntax

%string = userStatistics:DifferenceToString( ustatOld, [Zeros= boolean], - [NamesToLower= boolean])

Syntax terms

%ls
A longstring variable to contain the listing of the difference values of the Login statistics.
%ustat
A UserStatistics object variable.
%ustatOld
An older UserStatistics object variable for the same user login as %ustat.
Zeros= bool
This name required argument (Zeros) is a boolean value that indicates whether differences with a zero value should be included in the returned data. Zeros is an optional argument that defaults to False, which results in non-zero values only being included.

Usage notes

  • Request statistics are not valid for the Difference method since most don't really make sense for this operation. The Request statistics for which it does make sense (CPU, for example) have corresponding Login statistics that return the exact same difference.
  • The Difference function returns the value differences between two UserStatistics objects for the Login statistic you specify. The DifferenceToXmlDoc function returns to an XmlDoc object the differences for all, or all non-zero, Login statistics.

Examples

The following statement returns all the Login statistics that have non-zero difference values over the interval from the creation of %ustat1 to the creation of %ustat2:

Print %ustat2:differenceToString(%ustat1)

See also