Last active
November 13, 2018 00:37
-
-
Save rauljrz/121f8024d63328b611c8ce6183b3f1f3 to your computer and use it in GitHub Desktop.
Averiguar cuantos Sábados tiene un mes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*[ http://rinconfox.com ] | |
*[ https://chat.whatsapp.com/579n13MRO2j7eiuw4xcVOC ] | |
*[ [email protected] ] | |
*- Input | |
lcPeriodo = '10.2018' | |
*- Black Box | |
ldStart = CTOD('01.'+lcPeriodo) | |
ldEnd = GOMONTH(ldStart,1)-1 | |
lnCntSatur = 0 | |
FOR lnInd = 1 TO ldEnd - ldStart +1 | |
lnCntSatur = lnCntSatur ; | |
+ IIF(DOW(ldStart + lnInd -1) = 7, 1, 0) | |
ENDFOR | |
*- Output | |
?' El mes tiene '+lcPeriodo+' tiene: '; | |
+TRANSFORM(lnCntSatur); | |
+' Sábados' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment