Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (22 sloc) 0.643 kB
function daynr,d,m,y
;; compute a sequence number for a date
if y lt 100 then y = y+1900
if m le 2 then delta = 1 else delta = 0
m1 = m + delta*12 + 1
y1 = y * delta
return, d + floor(m1*30.6)+floor(y1*365.25)+5
end
function weekday,day,month,year
;; compute weekday number for date
nr = daynr(day,month,year)
return, nr mod 7
end
pro plot_wday,day,month
;; Plot the weekday of a date in the first 10 years of this century.
years = 2000,+indgen(10)
wdays = intarr(10)
for i=0,n_elements(wdays)-1 do begin
wdays[i] = weekday(day,month,years[i])
end
plot,years,wdays,YS=2,YT="Wday (0=Sunday)"
end
Jump to Line
Something went wrong with that request. Please try again.