UCC Wiki - UCCDate Widget [link broke atm]
Calendar Clock (work in progress)
Calendar Clock is also available as an App for Android Arm7, Android x86 , iOS or OSx
Source code UCClib.js
JavaScript handles dates using Date() objects representing an instant in time, stored internally as an offset in milliseconds from the Unix Epoc (1 Jan 1970). A UCCDate() object stores that same moment in time as an offset in milliseconds from the UCC Epoc (Mar 21 -11502). The UCC Epoc is milliseconds before the Unix Epoc, so we can easily convert from Unix to UCC dates and back by subtracting or adding that offset.
Example date for UCCDate object created for :
Property | Value | Description |
obj or obj.toString() | Value displayed with obj = or obj.toString() | |
obj.date | The date in UCC default format | |
obj.sortable | Date in computer sortable format | |
obj.full | Date in full format | |
obj.long | Date in long format | |
obj.medium | Date in medium format | |
obj.short | Date in short format | |
obj.instant | Instant in time represented by the object as ms since UCC Epoc | |
obj.offset | UCC Epoc offset from Unix Epoc in ms (constant) | |
obj.days | Days since UCC Epoc | |
obj.year | UCC Year number | |
obj.quarter | Current Quarter (season) | |
obj.triad | UCC Triad number | |
obj.day | UCC Day number | |
obj.deekDay | Decan day name (Deek-Day) | |
obj.greekDay | Greek Decan day name | |
obj.hindDay | Hindi Decan day name | |
obj.deekSymbol | Deek-Day Symbol | |
obj.deekNumber | Decan number | |
obj.doy | Day of the Year | |
obj.triadName | Triad name | |
obj.triadSymbol | Triad symbol | |
obj.triadDays | Days up to the start of the Triad | |
obj.festival | Festival name | |
obj.festivalNumber | Festival number | |
obj.festivalSymbol | Festival symbol | |
obj.intercal | Intercalary Day name | |
obj.intercals | Intercalary Days so far this year | |
obj.intercalSymbol | Intercalary Day symbol | |
obj.leapYear | Is this a leap year? | |
obj.yuga | Yuga/Greek Age | |
obj.zodiac | Zodiac Age | |
obj.leapDays | Leap Days added since UCC Epoc | |
obj.leapCycle | Leap Year Cycle number | |
obj.leapOffset | Years since the beginning of the current Leap Year Cycle | |
obj.moon | Moon phase | |
obj.moonSymbol | Moon phase symbol | |
obj.jDate | JavaScript Date() object | |
obj.gDate | Gregorian Date string | |
obj.TRIADS | List of Triad names | |
obj.TSYMBOLS | List of Triad symbols | |
obj.DECANS | List of Decan names | |
obj.GREECANS | List of Greek Decan names | |
obj.HICANS | List of Hindhu Decan names | |
obj.DSYMBOLS | List of Decan symbols | |
obj.MOONS | List of moon phases | |
obj.MSYMBOLS | List of moon symbols | |
obj.LANGUAGES | List of languages for names | |
obj.names | Language for Triad/Decan names (settable) | |
obj.version | Library version |
Code | Result | Notes |
new UCCDate(); | Defaults to current date. | |
new UCCDate(13470, 10, 12); | Date specified by year, triad and day. | |
new UCCDate(0, 0, 4920101); | Date specified by number of days since UCC Epoc. | |
new UCCDate(Date.UTC(1970, 0, 1)); | UCCDate initialised from number (ms since Unix Epoc) | |
new UCCDate(new Date('1 Jan 1970')); | UCCDate initialised from js Date() object. Note: javascript's Date(String) is buggy. Use an ISO string like '1970-01-01T00:00:00.000Z' | |
new UCCDate('1970-01-01T00:00:00.000Z'); | UCCDate initialised directly from ISO 8601 datestring | |
new UCCDate('13470.10.12'); | UCCDate initialised from UCC sortable format datestring |