1 <?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
2 -------------------------------------------------------------------------------
5 -------------------------------------------------------------------------------
6 This file is part of meconlib.
8 meconlib is free software; you can redistribute it and/or modify it under
9 the terms of the GNU General Public License as published by the Free
10 Software Foundation; either version 2 of the License, or (at your option)
13 meconlib is distributed in the hope that it will be useful, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License; if not,
18 write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
19 Boston, MA 02111-1307 USA
20 -------------------------------------------------------------------------------
21 Creado: vie nov 14 16:40:05 ART 2003
22 Autor: Leandro Lucarella <llucar@mecon.gov.ar>
23 -------------------------------------------------------------------------------
24 $Id: DBO.php 361 2003-10-06 16:56:46Z llucar $
25 -----------------------------------------------------------------------------*/
27 require_once 'Date.php';
28 require_once 'Date/Calc.php';
31 * Clase de manejo de fechas con algunos extra features.
35 class MECON_Date extends Date {
38 * Obtiene la fecha de inicio del próximo mes.
43 function getBeginOfNextMonth()
45 return new MECON_Date(Date_Calc::beginOfNextMonth(
46 $this->day, $this->month, $this->year, '%Y-%m-%d'));
50 * Obtiene la fecha de fin del próximo mes.
55 function getEndOfNextMonth()
57 return new MECON_Date(Date_Calc::endOfNextMonth(
58 $this->day, $this->month, $this->year, '%Y-%m-%d'));
62 * Obtiene la fecha de inicio del mes anterior.
67 function getBeginOfPrevMonth()
69 return new MECON_Date(Date_Calc::beginOfPrevMonth(
70 $this->day, $this->month, $this->year, '%Y-%m-%d'));
74 * Obtiene la fecha de fin del mes anterior.
79 function getEndOfPrevMonth()
81 return new MECON_Date(Date_Calc::endOfPrevMonth(
82 $this->day, $this->month, $this->year, '%Y-%m-%d'));