source: smart/trunk/p/C0SUTIL.m@ 1678

Last change on this file since 1678 was 1591, checked in by Sam Habiel, 12 years ago

Updated license for routines

File size: 1.2 KB
Line 
1C0SUTIL ; GPL - Smart Processing Utilities ;2/22/12 17:05
2 ;;1.0;VISTA SMART CONTAINER;;Sep 26, 2012;Build 5
3 ;Copyright 2012 George Lilly.
4 ;
5 ; This program is free software: you can redistribute it and/or modify
6 ; it under the terms of the GNU Affero General Public License as
7 ; published by the Free Software Foundation, either version 3 of the
8 ; License, or (at your option) any later version.
9 ;
10 ; This program is distributed in the hope that it will be useful,
11 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ; GNU Affero General Public License for more details.
14 ;
15 ; You should have received a copy of the GNU Affero General Public License
16 ; along with this program. If not, see <http://www.gnu.org/licenses/>.
17 ;
18 Q
19 ;
20SPDATE(ZDATE) ; extrinsic which returns the Smart date format yyyy-mm-dd
21 ; ZDATE is a fileman format date
22 N TMPDT
23 S TMPDT=$$FMTE^XLFDT(ZDATE,"7D") ; ordered date
24 S TMPDT=$TR(TMPDT,"/","-") ; change slashes to hyphens
25 I TMPDT="" S TMPDT="UNKNOWN"
26 N Z2,Z3
27 S Z2=$P(TMPDT,"-",2)
28 S Z3=$P(TMPDT,"-",3)
29 I $L(Z2)=1 S $P(TMPDT,"-",2)="0"_Z2
30 I $L(Z3)=1 S $P(TMPDT,"-",3)="0"_Z3
31 Q TMPDT
32 ;
Note: See TracBrowser for help on using the repository browser.