Difference between revisions of "Comparing time value formats"
From EtherWiki
Line 1: | Line 1: | ||
− | + | '''[[Phonebot_developer%27s_reference/Object_reference#Datetime|Datetime]] object''' | |
− | + | ||
− | + | The <code>add_duration()</code> method takes a parameter that represents a duration in a single unit of time. | |
− | + | ||
+ | DURATION[y|M|d|h|m|s] | ||
+ | |||
+ | The <code>format()</code> method takes a parameter that uses the Java [http://download.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html#datepattern date format pattern syntax]. | ||
+ | |||
+ | The <code>format_difference()</code> method formats the datetime value as <code>HH:mm:ss</code>. | ||
+ | |||
+ | '''[[Using_Phonebot_services#Object_reference|Services]]''' | ||
+ | |||
+ | The sensor service <code>minimum_update</code> property takes an integer value in milliseconds. | ||
+ | |||
+ | The timer service <code>duration</code> property takes a value formatted as <code>h:m:s</code>, <code>m:s</code>, or <code>s</code>. | ||
[[Category:Phonebot]] | [[Category:Phonebot]] |
Revision as of 03:25, 21 June 2012
Datetime object
The add_duration()
method takes a parameter that represents a duration in a single unit of time.
DURATION[y|M|d|h|m|s]
The format()
method takes a parameter that uses the Java date format pattern syntax.
The format_difference()
method formats the datetime value as HH:mm:ss
.
The sensor service minimum_update
property takes an integer value in milliseconds.
The timer service duration
property takes a value formatted as h:m:s
, m:s
, or s
.