Monday, November 08, 2010 at 12:02 AM.
system.verbs.builtins.date.sameDay
on sameDay (d1, d2) {
<<Changes
<<1/14/02; 8:01:44 PM by DW
<<Created. Return true if the two date-times are on the same day.
<<http://docserver.userland.com/date/sameDay
local (day1, month1, year1, hour1, minute1, second1);
date.get (d1, @day1, @month1, @year1, @hour1, @minute1, @second1);
local (day2, month2, year2, hour2, minute2, second2);
date.get (d2, @day2, @month2, @year2, @hour2, @minute2, @second2);
return ((year1 == year2) and (month1 == month2) and (day1 == day2))}
<<bundle //test code
<<dialog.alert (date.sameDay (clock.now (), date ("12/25/99")))
<<dialog.alert (date.sameDay (clock.now (), date ("1/14/02")))
This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.