Lively Kernel canvas
null0.6274882426879329null
null1.4709473344114257null
null1.5251659254475984null
null1.1459641638755542null
null1.4480610675215615null
null1.7365833601284109null
null1.6521381980800942null
null1.9284368379273291null
YEAR
DAY_OF_MONTH(1-31x)
null1.0856978585553703null
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
null1.6154095537478552null
TimeUnitGraph-JulianCalendar1
nullnullnullnullnullnullnullnull
null2.29906973608975null
HOUR(0-24)
nullnullnullnullnullnullnullnull
null1.8549493536825916null
MINUTE(0-59)
SECOND
WEEK_OF_YEAR(1-52x)
DAY_OF_YEAR(0-365x)
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
null2.2875574849099185null
null1.9609492715978896null
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
null0.289708418371069null
MONTH_OF_YEAR(1-12)
MONTH_IN_QUARTER(1-3)
WEEK_OF_MONTH(1-5x)
DAY_OF_WEEK(1-7)
WEEK(0toinfinity)
null1.765816594199818null
null2.183616528960138null
null2.7034025066151233null
QUARTER_OF_YEAR(1-3)
QUARTER(0toinfinity)
RollingTimeUnits:TheyellowishTimeUnitsbelow(YEAR,QUARTER,MONTH,WEEK,DAY)alwaysrepresentthetopofthehierarchy,andarethetimeUnitmemberonRollingTimeUnitRoot.Theyare"parentless",andalso"rolling",althoughtheymay"skip"(e.g.Everysecondmonth).3
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
null1.6986662453548964null
HOW-TOCreatePatternsgiventheEntityModel:1.Listentothewaythepatternisdescribed,andfindthehighestlevelTimeUnit(longest)2.CreateandinstanceofRollingTimeUnitRoot.ThelongestTimeUnitwillbecomethetimeUnit.Itmustbeoneofthe"rolling"units,YEAR,QUARTER,MONTH,WEEK,DAYIfthelongesttimeunitis"skipping"(forexample,"everysecondandfourthweek"),thenRollingTimeUnitRoot.timeUnitSizeissettothemaximumvalue.Otherwise,1.3.CreateaninstanceofTimeUnitPath,withparent=theinstancecreatedinstep2Ifthelongesttimeunitis"skipping",thenthisTimeUnitpath.timeUnit=longestunit,otherwiseTimeUnitpath.timeUnit=asmallerUnitbelowlongest.Repeatthisprocessuntilyoureachtypically,aDAY4.CreateaninstanceofTimeUnitLeafwithtimeUnit=DAY(_OF_WEEKorwhateverapplicable),andattachtoit'sparentTimeUnitPathExample:Everyfirstweek,Fridays06:00-10:00,secondweek,Wednesdays,07:00-15:001)Thelongestunitmentionedis"week",socreateinstanceofRollingTimeUnitRoot,suchthat-aRollingTimeUnitRoot.timeUnit=WEEK(Note-mustbeoneofthe"top"="rolling"units)-aRollingTimeUnitRoot.rollingSize=2(becausewesaid"everysecondweek")2.Because"everysecondweekwasspecified,wehavetocreateapathforeveryweekoftherollingunit(WEEK1andWEEK2).Create2instanesofTimeUnitPath-aTimeUnitPathWeek1-timeUnit=WEEK-sequenceInParent=1-aTimeUnitPathWeek2-timeUnit=WEEK-sequenceInParent=2-attachaRollingTimeUnitRoottoaTimeUnitPathWeek1andaTimeUnitPathWeek23)ThenextstepbelowWEEKisDAY_OF_WEEK.TimeUniLeafistypicallyaDAY-typeunit.SoforeachWEEK(1,2)above,createoneaTimeUnitLeaf-aTimeUnitLeafeFRIWeek1-timeUnit=DAY_OF_WEEK-sequenceInParent=6[FRIDAY]-aTimeUnitLeafeWEDWeek2-timeUnit=DAY_OF_WEEK-sequenceInParent=4[WED]-attachaTimeUnitLeafeFRIWeek1toaTimeUnitPathWeek1andaTimeUnitLeafeWEDWeek2toaTimeUnitPathWeek2(Alsoseeexampleinhttp://www.lively-kernel.org/repository/lively-wiki/users/mzimmerm/TimePatternExamples.xhtml)40
MONTH(0toinfinity)
DAY(0toinfinity)
Note:WEEK_OF_MONTHisa(sequenceof)7-dayperiodSstartingonthefirstofmonth
1
Wikicontroltruetrue
JulianTimeUnitGraph.(Mark,IwilltrasnferthistomagicDrawmorepreciselyandwithdetails)Whencreatingrepetitivetimepatterns,usersmayexpressthemas:1)FirstMonthofEveryQuarter2)FirstMonthofEveryYear3)FirstWeekofEveryMonth4)Mondays,FirstWeekofeverymonth5)Biweekly,FirstweekonMondays,SecondweekonTuesdays6)Everyfifthyear,secondmonth,thirdweek,WednesdaysandThursdays,between2amand12ametcThesimpleexpressionsin1and2areinteresting,becausetheyrevealthatforsuchpatterncreation,itisnotenoughtospecifythe"timeunit"(YEAR,MONTH,etc)and"sequence"(first,second,etc),butalsothe"parenttimeunit":Arepetitivepatterncreatedas"FirstMonthofEveryQuarter"isverydifferentfrompattern"FirstMonthofEveryYear".Also,thereare3monthsinaQUARTER,butthereare12monthsinaYEARThisgraphshowssome(notallIguess)timeunits"paths"thatusersmayusewhenspecifyingrepetitiveunits.TODO:addWEEK_OF_YEARpathWORKING_DAY(OF_YEAR,MONTH,WEEK)-howtospecify??add"patternbegin"and"patternend"small"x"inthecountrepresentsthisdependsonparent8
null24