It finds the previous month. So if the CURRENT month is 1, it sets the
month to twelve, and decreases the year with 1. Otherwise it simply
decreases the value for month with 1.

Does that help?

((enjoy))

Michiel Beijen
R&D

Follow me on Twitter: @otrsnl [https://twitter.com/otrsnl]

OTRS AG
Norsk-Data-Str. 1
61352 Bad Homburg
GERMANY

T: +31 (0) 6457 42418
F: +49 (0) 9421 56818-18
I:  http://www.otrs.com

Business Location: Bad Homburg, Country Court: Bad Homburg, HRB 10751,
VAT ID: DE256610065
Chairman: Burchard Steinbild, Managing Board: André Mindermann

GET OTRS::ITSM 2.0 NOW - including the brand new change management
module! It´s the only ITIL® V3 compatible open-source IT Service
Management solution certified by PinkVERIFY worldwide! -
http://bit.ly/dv4CJF




On Wed, Jun 2, 2010 at 10:46 PM, Alejandra Piedra
<alejandra.pie...@iica.int> wrote:
> Hi Atanas
>
>
>
> I just have one question regarding a certain section of your code, which
> I’ve already seen in the other Static stat from OTRS.
>
> What does this do?
>
>
>
> # get current time
>
>     my ($s, $m, $h, $D, $M, $Y);
>
>     my ($Ymin, $Ymax, $Select, %Agents, @row);
>
>
>
>     ($s, $m, $h, $D, $M, $Y) = $Self->{TimeObject}->SystemTime2Date(
>
>         SystemTime => $Self->{TimeObject}->SystemTime(),
>
>     );
>
>
>
>     # get one month before
>
>     if ($M == 1) {
>
>         $M = 12;
>
>         $Y = $Y - 1;
>
>     }
>
>     else {
>
>         $M = $M -1;
>
>     }
>
>
>
> Thanks and regards
>
>
>
> María Alejandra Piedra
>
> Unidad de Informática y Sistemas de Información
>
> IICA (506) 2216-0171
>
> alejandra.pie...@iica.int
>
>
>
> ---------------------------------------------------------------------
> OTRS mailing list: otrs - Webpage: http://otrs.org/
> Archive: http://lists.otrs.org/pipermail/otrs
> To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
>
> NEW! ENTERPRISE SUBSCRIPTION - Get more information NOW!
> http://www.otrs.com/en/support/enterprise-subscription/
>
---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs

NEW! ENTERPRISE SUBSCRIPTION - Get more information NOW!
http://www.otrs.com/en/support/enterprise-subscription/

Reply via email to