Przeglądaj źródła

tmrec: updated the examples with tmrec duration

- hint to read rfc2445 for duration format

(cherry picked from commit 99d1170469c60206992c083f2ba0e9dc6b580d37)
(cherry picked from commit df0218611b8f27ccaa924b8f88560c2e81966823)
Daniel-Constantin Mierla 11 lat temu
rodzic
commit
7273c7cbc6
2 zmienionych plików z 7 dodań i 6 usunięć
  1. 3 3
      modules/tmrec/README
  2. 4 3
      modules/tmrec/doc/tmrec_admin.xml

+ 3 - 3
modules/tmrec/README

@@ -138,7 +138,7 @@ modparam("tmrec", "separator", ";")
        subsequent intervals do not overlap. For non-recurring intervals,
        subsequent intervals do not overlap. For non-recurring intervals,
        durations of any positive length are permitted. Zero-length
        durations of any positive length are permitted. Zero-length
        duration means "forever". Negative-length durations are not
        duration means "forever". Negative-length durations are not
-       allowed.
+       allowed. See RFC 2445 for the format of duration.
      * frequency - can be one of the following values: "daily" - specify
      * frequency - can be one of the following values: "daily" - specify
        repeating periods based on an interval of a day or more; "weekly" -
        repeating periods based on an interval of a day or more; "weekly" -
        specify repeating periods based on an interval of a week or more;
        specify repeating periods based on an interval of a week or more;
@@ -222,9 +222,9 @@ modparam("tmrec", "separator", ";")
 
 
    Example 1.2. tmrec_match usage
    Example 1.2. tmrec_match usage
 ...
 ...
-        if(tmrec_match("20120101T000000|24H|weekly|||SA,SU")
+        if(tmrec_match("20120101T000000|PT24H|weekly|||SA,SU")
         xdbg("it is weekend!\n");
         xdbg("it is weekend!\n");
-    if(tmrec_match("20120101T083000|10H|weekly|||MO,TU,WE,TH,FR")
+    if(tmrec_match("20120101T083000|PT10H|weekly|||MO,TU,WE,TH,FR")
         xdbg("it is with working hours\n");
         xdbg("it is with working hours\n");
 ...
 ...
 
 

+ 4 - 3
modules/tmrec/doc/tmrec_admin.xml

@@ -127,7 +127,8 @@ modparam("tmrec", "separator", ";")
 			be small enough such that subsequent intervals do not overlap. 
 			be small enough such that subsequent intervals do not overlap. 
 			For non-recurring intervals, durations of any positive length are 
 			For non-recurring intervals, durations of any positive length are 
 			permitted.  Zero-length duration means <quote>forever</quote>. 
 			permitted.  Zero-length duration means <quote>forever</quote>. 
-			Negative-length durations are not allowed.
+			Negative-length durations are not allowed. See RFC 2445 for
+			the format of duration.
 			</para>
 			</para>
 		</listitem>
 		</listitem>
 		<listitem>
 		<listitem>
@@ -274,9 +275,9 @@ modparam("tmrec", "separator", ";")
 		<title><function>tmrec_match</function> usage</title>
 		<title><function>tmrec_match</function> usage</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
 ...
 ...
-	if(tmrec_match("20120101T000000|24H|weekly|||SA,SU")
+	if(tmrec_match("20120101T000000|PT24H|weekly|||SA,SU")
         xdbg("it is weekend!\n");
         xdbg("it is weekend!\n");
-    if(tmrec_match("20120101T083000|10H|weekly|||MO,TU,WE,TH,FR")
+    if(tmrec_match("20120101T083000|PT10H|weekly|||MO,TU,WE,TH,FR")
         xdbg("it is with working hours\n");
         xdbg("it is with working hours\n");
 ...
 ...
 </programlisting>
 </programlisting>