This module provides time recurrence matching functions. The format of recurrence definitions is based on Internet Calendaring and Scheduling Core Object Specification (Calendar COS - RFC 2445). It also provides a port of the Perl Time::Period module for generic time period matching.
| Parámetro | Tipo | Descripción |
|---|---|---|
| separator | str | 3.1. separator (str) |
| separator | str | Separator character used to delimit attributes in time recurrence definitions. |
4.2. is_leap_year([year]) 4.3. time_period_match(period [, timestamp])
4.3. time_period_match(period [, timestamp])
4.1. tmrec_match(timerec [, timestamp])
Match a time recurrence rule against the timestamp (UNIX epoch format). If the timestamp parameter is missing, the current UNIX epoch time is used.
Return true if the value from parameter is a leap year. If the parameter is missing, then the year from the current time is taken.
Matches the point in time specified by the timestamp parameter, or the current time if the parameter is missing, against the given period specification. Returns 1 if it matches, -1 if it doesn't, and a value <= -2 if there was an error.
Copyright © 2012 asipto.com
Copyright © 2012 Sipwise GmbH