Permalink
Browse files

Fill in docs for date

  • Loading branch information...
1 parent b04f8cf commit 6dd6c2479d6aac58ca6cc55595adcdd9cf7dd7f5 @Whiteknight committed Jan 14, 2012
Showing with 32 additions and 0 deletions.
  1. +32 −0 libraries/date.md
View
32 libraries/date.md
@@ -15,18 +15,50 @@ objects as well.
### Rosella.Date
+The `Rosella.Date` namespace contains a number of utility functions for working
+with Date objects.
+
+ var d = Rosella.Date.now();
+ var m = Rosella.Date.min();
+ var m = Rosella.Date.max();
+ string day = Rosella.Date.get_day_of_week_name(2012, 1, 14);
+ int y = Rosella.Date.is_leap_year(2012);
+
## Classes
### Rosella.Date
+`Rosella.Date` objects are the default class for working with dates and times.
+
### Rosella.Date.DateFormatter
+`Rosella.Date.DateFormatter` is a StringFormatter type specially designed for
+Date objects. It takes a format string with identifiers such as "yyyy" (year),
+"MM" (month), "dd" (day), "hh" (hour), "mm" (minute), "ss" (second) and
+replaces those values in the string with the corresponding values from the
+Date object.
+
+You can use this type directly or you can call the `.format_string()` method
+on the Date object.
+
### Rosella.Date.SpecialDate
+`Rosella.Date.SpecialDate` are special date objects which represent values which
+aren't necessarily real dates. This is an abstract parent type and should not
+be used directly.
+
### Rosella.Date.SpecialDate.Minimum
+`Rosella.Date.SpecialDate.Minimum` is a special singleton value which represents
+a guaranteed minimum date. Minimum dates are always guaranteed to be compared
+less than all other dates, and is equal only to itself.
+
### Rosella.Date.SpecialDate.Maximum
+`Rosella.Date.SpecialDate.Maximum` is a special singleton value which represents
+a guaranteed maximum date. Maximum dates are always guaranteed to be compared
+greater than all other dates, and is equal only to itself.
+
## Examples
### Winxed

0 comments on commit 6dd6c24

Please sign in to comment.