/[openfoncier]/trunk/obj/commune.class.php
ViewVC logotype

Annotation of /trunk/obj/commune.class.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9496 - (hide annotations)
Thu Aug 27 15:00:26 2020 UTC (4 years, 5 months ago) by mbideau
Original Path: branches/4.14.0-develop_ajout_dossier_commune/obj/commune.class.php
File size: 824 byte(s)
Le champs code_depcom de la saisie manuelle est vidé lorsqu'aucune collectivité n'est sélectionnée (comme avant); Bux fix: Warning: use statement in commune.class.php
1 mbideau 9470 <?php
2     //$Id$
3     //gen openMairie le 20/08/2020 15:43
4    
5     require_once "../gen/obj/commune.class.php";
6    
7     class commune extends commune_gen {
8    
9 mbideau 9494 /**
10     * Retourne 'true' si une commune est archivée au moment spécifié (hors dates de validité)
11     *
12     * @param object $refDT (optionel) Un temps de référence pour la comparaison
13     *
14     * @return bool
15     */
16     public function archivee(object $refDT = null) : bool {
17     if (empty($refDT)) {
18     $refDT = new DateTime();
19     }
20     if ($refDT < (new DateTime($this->getVal('validite_debut')))) {
21     return true;
22     }
23     if (!empty($this->getVal('validite_fin'))) {
24     if ($refDT > (new DateTime($this->getVal('validite_fin')))) {
25     return true;
26     }
27     }
28     return false;
29     }
30 mbideau 9470 }

Properties

Name Value
svn:executable *

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26