Changeset 1540 for smart/trunk/p/C0SUTIL.m
- Timestamp:
- Sep 26, 2012, 1:00:27 PM (13 years ago)
- File:
-
- 1 edited
-
smart/trunk/p/C0SUTIL.m (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
smart/trunk/p/C0SUTIL.m
r1526 r1540 1 C0SUTIL ; GPL - Smart Processing Utilities ;2/22/12 17:052 ;;0.1;C0S;nopatch;noreleasedate;Build 23 ;Copyright 2012 George Lilly. Licensed under the terms of the GNU4 ;General Public License See attached copy of the License.5 ;6 ;This program is free software; you can redistribute it and/or modify7 ;it under the terms of the GNU General Public License as published by8 ;the Free Software Foundation; either version 2 of the License, or9 ;(at your option) any later version.10 ;11 ;This program is distributed in the hope that it will be useful,12 ;but WITHOUT ANY WARRANTY; without even the implied warranty of13 ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14 ;GNU General Public License for more details.15 ;16 ;You should have received a copy of the GNU General Public License along17 ;with this program; if not, write to the Free Software Foundation, Inc.,18 ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.19 ;20 Q21 ;22 SPDATE(ZDATE) ; extrinsic which returns the Smart date format yyyy-mm-dd23 ; ZDATE is a fileman format date24 N TMPDT25 S TMPDT=$$FMTE^XLFDT(ZDATE,"7D") ; ordered date26 S TMPDT=$TR(TMPDT,"/","-") ; change slashes to hyphens27 I TMPDT="" S TMPDT="UNKNOWN"28 N Z2,Z329 S Z2=$P(TMPDT,"-",2)30 S Z3=$P(TMPDT,"-",3)31 I $L(Z2)=1 S $P(TMPDT,"-",2)="0"_Z232 I $L(Z3)=1 S $P(TMPDT,"-",3)="0"_Z333 Q TMPDT34 ;1 C0SUTIL ; GPL - Smart Processing Utilities ;2/22/12 17:05 2 ;;1.0;VISTA SMART CONTAINER;;Sep 26, 2012;Build 2 3 ;Copyright 2012 George Lilly. Licensed under the terms of the GNU 4 ;General Public License See attached copy of the License. 5 ; 6 ;This program is free software; you can redistribute it and/or modify 7 ;it under the terms of the GNU General Public License as published by 8 ;the Free Software Foundation; either version 2 of the License, or 9 ;(at your option) any later version. 10 ; 11 ;This program is distributed in the hope that it will be useful, 12 ;but WITHOUT ANY WARRANTY; without even the implied warranty of 13 ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 ;GNU General Public License for more details. 15 ; 16 ;You should have received a copy of the GNU General Public License along 17 ;with this program; if not, write to the Free Software Foundation, Inc., 18 ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 ; 20 Q 21 ; 22 SPDATE(ZDATE) ; extrinsic which returns the Smart date format yyyy-mm-dd 23 ; ZDATE is a fileman format date 24 N TMPDT 25 S TMPDT=$$FMTE^XLFDT(ZDATE,"7D") ; ordered date 26 S TMPDT=$TR(TMPDT,"/","-") ; change slashes to hyphens 27 I TMPDT="" S TMPDT="UNKNOWN" 28 N Z2,Z3 29 S Z2=$P(TMPDT,"-",2) 30 S Z3=$P(TMPDT,"-",3) 31 I $L(Z2)=1 S $P(TMPDT,"-",2)="0"_Z2 32 I $L(Z3)=1 S $P(TMPDT,"-",3)="0"_Z3 33 Q TMPDT 34 ;
Note:
See TracChangeset
for help on using the changeset viewer.
