Skip to content
This repository
Browse code

Fill in docs for date

  • Loading branch information...
commit 6dd6c2479d6aac58ca6cc55595adcdd9cf7dd7f5 1 parent b04f8cf
Andrew Whitworth authored

Showing 1 changed file with 32 additions and 0 deletions. Show diff stats Hide diff stats

  1. +32 0 libraries/date.md
32 libraries/date.md
Source Rendered
@@ -15,18 +15,50 @@ objects as well.
15 15
16 16 ### Rosella.Date
17 17
  18 +The `Rosella.Date` namespace contains a number of utility functions for working
  19 +with Date objects.
  20 +
  21 + var d = Rosella.Date.now();
  22 + var m = Rosella.Date.min();
  23 + var m = Rosella.Date.max();
  24 + string day = Rosella.Date.get_day_of_week_name(2012, 1, 14);
  25 + int y = Rosella.Date.is_leap_year(2012);
  26 +
18 27 ## Classes
19 28
20 29 ### Rosella.Date
21 30
  31 +`Rosella.Date` objects are the default class for working with dates and times.
  32 +
22 33 ### Rosella.Date.DateFormatter
23 34
  35 +`Rosella.Date.DateFormatter` is a StringFormatter type specially designed for
  36 +Date objects. It takes a format string with identifiers such as "yyyy" (year),
  37 +"MM" (month), "dd" (day), "hh" (hour), "mm" (minute), "ss" (second) and
  38 +replaces those values in the string with the corresponding values from the
  39 +Date object.
  40 +
  41 +You can use this type directly or you can call the `.format_string()` method
  42 +on the Date object.
  43 +
24 44 ### Rosella.Date.SpecialDate
25 45
  46 +`Rosella.Date.SpecialDate` are special date objects which represent values which
  47 +aren't necessarily real dates. This is an abstract parent type and should not
  48 +be used directly.
  49 +
26 50 ### Rosella.Date.SpecialDate.Minimum
27 51
  52 +`Rosella.Date.SpecialDate.Minimum` is a special singleton value which represents
  53 +a guaranteed minimum date. Minimum dates are always guaranteed to be compared
  54 +less than all other dates, and is equal only to itself.
  55 +
28 56 ### Rosella.Date.SpecialDate.Maximum
29 57
  58 +`Rosella.Date.SpecialDate.Maximum` is a special singleton value which represents
  59 +a guaranteed maximum date. Maximum dates are always guaranteed to be compared
  60 +greater than all other dates, and is equal only to itself.
  61 +
30 62 ## Examples
31 63
32 64 ### Winxed

0 comments on commit 6dd6c24

Please sign in to comment.
Something went wrong with that request. Please try again.