Today   (2020-02-02,   at the time of this writing)   happens to be a palindrome,   without the hyphens,   not only for those countries which express their dates in the   yyyy-mm-dd   format but,   unusually,   also for countries which use the   dd-mm-yyyy   format.



Task
Write a program which calculates and shows the next 15 palindromic dates for those countries which express their dates in the   yyyy-mm-dd   format.




 
dateTest$ = ""
total = 0
 
PRINT "Siguientes 15 fechas palindr¢micas al 2020-02-02:"
FOR anno = 2021 TO 9999
    dateTest$ = LTRIM$(STR$(anno))
    FOR mes = 1 TO 12
        IF mes < 10 THEN dateTest$ = dateTest$ + "0"
        dateTest$ = dateTest$ + LTRIM$(STR$(mes))
        FOR dia = 1 TO 31
            IF mes = 2 AND dia > 28 THEN EXIT FOR
            IF (mes = 4 OR mes = 6 OR mes = 9 OR mes = 11) AND dia > 30 THEN EXIT FOR
            IF dia < 10 THEN dateTest$ = dateTest$ + "0"
            dateTest$ = dateTest$ + LTRIM$(STR$(dia))
            FOR Pal = 1 TO 4
                IF MID$(dateTest$, Pal, 1) <> MID$(dateTest$, 9 - Pal, 1) THEN EXIT FOR
            NEXT Pal
            IF Pal = 5 THEN
               total = total + 1
               IF total <= 15 THEN PRINT LEFT$(dateTest$, 4); "-"; MID$(dateTest$, 5, 2); "-"; RIGHT$(dateTest$, 2)
            END IF
            IF total > 15 THEN
               EXIT FOR: EXIT FOR: EXIT FOR
            END IF
            dateTest$ = LEFT$(dateTest$, 6)
        NEXT dia
        dateTest$ = LEFT$(dateTest$, 4)
    NEXT mes
    dateTest$ = ""
NEXT anno
END
 