[datejs commit] r170 - wiki

1 view
Skip to first unread message

codesite...@google.com

unread,
Apr 25, 2008, 4:42:45 PM4/25/08
to ge...@coolite.com
Author: ge...@coolite.com
Date: Fri Apr 25 13:42:00 2008
New Revision: 170

Modified:
wiki/APIDocumentation.wiki

Log:
Updating Wiki documentation style

Modified: wiki/APIDocumentation.wiki
==============================================================================
--- wiki/APIDocumentation.wiki (original)
+++ wiki/APIDocumentation.wiki Fri Apr 25 13:42:00 2008
@@ -495,7 +495,7 @@
}}}

.
-==http://www.datejs.com/images/function.gif addDays ( `Number` days
) : `Date`==
+==http://www.datejs.com/images/function.gif addDays== ==( `Number`
days ) : `Date`==

Adds the specified number of days to this instance. The number can
be positive or negative.

@@ -589,6 +589,62 @@
var past = new Date(2000, 4, 5);
var future = new Date(2010, 11, 25)
Date.today().between(past, future); // true|false
+}}}
+
+.
+==http://www.datejs.com/images/function.gif isAfter ( `Date` date ) : `Boolean`==
+
+ Determines if this date occurs after the date to compare to.
+
+ ====Parameters====
+
+ * {`Date` date} Date object to compare. If no date to compare,
new Date() ("now") is used.
+
+ ====Return Value====
+
+ {`Boolean`} true if this date instance is greater than the date to
compare to (or "now"), otherwise false.
+
+ ====Examples====
+{{{
+var tomorrow = new Date().add(1).day();
+Date.today().isAfter(tomorrow); // false
+Date.today().isBefore(tomorrow); // true
+
+var yesterday = new Date().add(-1).day();
+Date.today().isAfter(yesterday); // true
+Date.today().isBefore(yesterday); // false
+
+// No date to compare to...
+Date.today().isAfter(); // false
+Date.today().isBefore(); // true
+}}}
+
+.
+==http://www.datejs.com/images/function.gif isBefore ( `Date` date ) : `Boolean`==
+
+ Determines if this date occurs before the date to compare to.
+
+ ====Parameters====
+
+ * {`Date` date} Date object to compare. If no date to compare,
new Date() ("now") is used.
+
+ ====Return Value====
+
+ {`Boolean`} true if this date instance is greater than the date to
compare to (or "now"), otherwise false.
+
+ ====Examples====
+{{{
+var tomorrow = new Date().add(1).day();
+Date.today().isAfter(tomorrow); // false
+Date.today().isBefore(tomorrow); // true
+
+var yesterday = new Date().add(-1).day();
+Date.today().isAfter(yesterday); // true
+Date.today().isBefore(yesterday); // false
+
+// No date to compare to...
+Date.today().isAfter(); // false
+Date.today().isBefore(); // true
}}}

.

Reply all
Reply to author
Forward
0 new messages