UCC Library

UCC Wiki

UCC Wiki - UCCDate Widget [link broke atm]

Simple example

Calendar Clock (work in progress)

Calendar Clock is also available as an App for Android Arm7, Android x86 , iOS or OSx

Date Calculator

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.

UCCDate() Properties

Example date for UCCDate object created for :

obj or obj.toString()Value displayed with obj = or obj.toString()
obj.dateThe date in UCC default format
obj.sortableDate in computer sortable format
obj.fullDate in full format
obj.longDate in long format
obj.mediumDate in medium format
obj.shortDate in short format
obj.instantInstant in time represented by the object as ms since UCC Epoc
obj.offsetUCC Epoc offset from Unix Epoc in ms (constant)
obj.daysDays since UCC Epoc
obj.yearUCC Year number
obj.quarterCurrent Quarter (season)
obj.triadUCC Triad number
obj.dayUCC Day number
obj.deekDayDecan day name (Deek-Day)
obj.greekDayGreek Decan day name
obj.hindDayHindi Decan day name
obj.deekSymbolDeek-Day Symbol
obj.deekNumberDecan number
obj.doyDay of the Year
obj.triadNameTriad name
obj.triadSymbolTriad symbol
obj.triadDaysDays up to the start of the Triad
obj.festivalFestival name
obj.festivalNumberFestival number
obj.festivalSymbolFestival symbol
obj.intercalIntercalary Day name
obj.intercalsIntercalary Days so far this year
obj.intercalSymbolIntercalary Day symbol
obj.leapYearIs this a leap year?
obj.yugaYuga/Greek Age
obj.zodiacZodiac Age
obj.leapDaysLeap Days added since UCC Epoc
obj.leapCycleLeap Year Cycle number
obj.leapOffsetYears since the beginning of the current Leap Year Cycle
obj.moonMoon phase
obj.moonSymbolMoon phase symbol
obj.jDateJavaScript Date() object
obj.gDateGregorian Date string
obj.TRIADSList of Triad names
obj.TSYMBOLSList of Triad symbols
obj.DECANSList of Decan names
obj.GREECANSList of Greek Decan names
obj.HICANSList of Hindhu Decan names
obj.DSYMBOLSList of Decan symbols
obj.MOONSList of moon phases
obj.MSYMBOLSList of moon symbols
obj.LANGUAGESList of languages for names
obj.namesLanguage for Triad/Decan names (settable)
obj.versionLibrary version

Initialising the object

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

Select a UCC Date


Enter an ISO 8601 Date