Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,19 @@
import "/fmt" for Fmt
import "/date" for Date
var isPalDate = Fn.new { |date|
date = date.format(Date.rawDate)
return date == date[-1..0]
}
Date.default = Date.isoDate
System.print("The next 15 palindromic dates in yyyy-mm-dd format after 2020-02-02 are:")
var date = Date.new(2020, 2, 2)
var count = 0
while (count < 15) {
date = date.addDays(1)
if (isPalDate.call(date)) {
System.print(date)
count = count + 1
}
}