Skip to content

Instantly share code, notes, and snippets.

@dwachss
dwachss / GDate.md
Last active February 1, 2016 14:54
GDate API: generalized date object that allows for multiple calendar systems

#GDate

##Rationale Globalize as it stands (Version 1.0.0) assumes that dates are to be formatted and parsed using the Gregorian calendar. The CLDR database, however, includes nomenclature for other calendar systems. jquery/globalize#320 is the attempt to support those other calendars.

To make that possible, GDate is the proposed interface that abstracts the necessary calendar calculations, and that every supported calendar system should implement.

##Structure of a Generalized Date The CLDR json data assumes the following for a date in a given calendar system:

  • Every day is uniquely defined by five parameters: era, year, month, date and monthtype, though there may be days that are not defined in a given calendar (for instance, in the Jewish calendar, dating starts at 7 October 3761 BCE and days before this are undefined).
@dwachss
dwachss / testing.md
Last active August 29, 2015 14:23
Just playing

##Title

  • do this
  • something else

important