是否可以24小时HHMM格式获取小时和分钟,以便1:01为0101
我想出了一种在月份和年份中执行此操作的方法,但是在小时和分钟中却找不到方法。
这是我到目前为止所拥有的。
set whichUrl to 0
set fileNames to "map"
set theStartDate to the date "Tuesday, June 21, 2016 at 00:00:00"
set theEndDate to theStartDate + (60 * 60 * 24 * 365) --1 year
set theDate to theStartDate
repeat until theDate = theEndDate
set theURL to "http://site.com/map.php?iso="
set {year:y, month:m, day:d} to (theDate)
set theModDate to (y * 10000 + m * 100 + d) as string
set theURL to theURL & theModDate & hours of theDate
set theURL to theURL & minutes of theDate
tell application "Safari"
activate
set the URL of document 1 to theURL as text
delay 2
end tell
set theDate to theDate + (600) --advance 10 minutes
set whichUrl to whichUrl + 1
end repeat