/[dtapublic]/to_be_filed/webprojs/php_libraries/php_library/fboprime/dt8x.inc
ViewVC logotype

Annotation of /to_be_filed/webprojs/php_libraries/php_library/fboprime/dt8x.inc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 35 - (hide annotations) (download)
Sat Oct 8 23:35:33 2016 UTC (7 years, 7 months ago) by dashley
File size: 2600 byte(s)
Initial commit.
1 dashley 35 <?php
2     //$Header: /hl/cvsroots/gpl01/gpl01/webprojs/fboprime/sw/phplib/dt8x.inc,v 1.1 2006/11/04 19:31:01 dashley Exp $
3     //--------------------------------------------------------------------------------------------------------------
4     //dt8.inc--FboPrime Functions Manipulating DT8 Data Type
5     //Copyright (C) 2006 David T. Ashley
6     //
7     //This program is free software; you can redistribute it and/or
8     //modify it under the terms of the GNU General Public License
9     //as published by the Free Software Foundation; either version 2
10     //of the License, or (at your option) any later version.
11     //
12     //This program is distributed in the hope that it will be useful,
13     //but WITHOUT ANY WARRANTY; without even the implied warranty of
14     //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15     //GNU General Public License for more details.
16     //
17     //You should have received a copy of the GNU General Public License
18     //along with this program; if not, write to the Free Software
19     //Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20     //********************************************************************************
21     //This contains functions that deal with the DT8 data type (calenadar dates in
22     //the form "YYYYMMDD", for example "20060415") that are not needed for dayview
23     //scheduling.
24     //--------------------------------------------------------------------------------------------------------------
25     require_once("dt8.inc");
26     require_once("datefuncx.inc");
27     //
28     //--------------------------------------------------------------------------------------------------------------
29     //Returns a string of the form DD-Mon-YYYY (example: 03-Sep-2006) based on a
30     //passed DT8. If the DT8 is blank or invalid, returns "Never".
31     //
32     function DT8_ddmmmyyyy_string($dt8_in)
33     {
34     $dt8_in = Trim($dt8_in);
35    
36     if (strlen($dt8_in) != 8)
37     {
38     return("Never");
39     }
40     else
41     {
42     DT8_extract_components($dt8_in, $valid, $components);
43    
44     if (!$valid)
45     {
46     return("Never");
47     }
48     else
49     {
50     return(sprintf("%02d-%s-%04d",
51     $components[2],
52     DATEFUNC_string_month_short($components[1]),
53     $components[0]
54     ));
55     }
56     }
57     }
58     //
59     //--------------------------------------------------------------------------------------------------------------
60     //End of $RCSfile: dt8x.inc,v $.
61     //--------------------------------------------------------------------------------------------------------------
62     ?>

dashley@gmail.com
ViewVC Help
Powered by ViewVC 1.1.25