11 """Formats the stardate for news"""
19 """Formate the stardate time for news"""
27 """Returns a string with the required number of zeros for each faction"""
38 """takes a stardate string and returns a list of ints with
39 [year,month,date,hour,minute,second]"""
41 facstdt = (float(stdt)*SCALEFACTOR+float(
getZeroStarDate(fac)))*datesys[3]
42 incyear = int(facstdt)/1000
43 return [incyear] +
getMDDHMS(facstdt-(incyear*1000),datesys,incyear,fac)
46 for mon
in monthsystem:
53 for mon
in monthsystem:
58 for i
in range(len(monthsys)):
60 if monthsys[i][0] == lmon[0]:
61 monthsys[i] = (monthsys[i][0],monthsys[i][1] + lmon[1])
69 mon = monthsystem[0][0]
70 for i
in range(len(monthsystem)):
71 countdays+=monthsystem[i][1]
72 if countdays >= numdays:
73 mon = monthsystem[i][0]
76 remdays = numdays - countdays
80 remainder = remdays - days
82 htemp = remainder * system[1][0]
84 mintemp = (htemp - hours) * system[1][1]
85 minutes = int(mintemp)
86 sectemp = (mintemp - minutes) * system[1][2]
87 seconds = int(sectemp)
88 return [mon,days+1,hours,minutes,seconds]
92 """returns a particlar races standard date system (not including leap years)"""
100 """returns a particlar races stardate to day ratio"""
104 """Returns the VS stardate at which each faction has the zero date."""
105 if faction ==
"confed":
111 if faction ==
"confed":
115 return [(
"February",1)]
122 return [(
"February",1)]
127 """returns the date systems for all the factions with special ones.
128 It is a tuple, with the first item a list of (month,#days) tuples, the second
129 a tuple with (#hoursperday,#minutesperhour,#secondsperminute), the third is
130 a list of the names for the time divisions, and the last is the number of
131 cycles (years) per standard kilostardate."""
134 ([(
"January",31),(
"February",28),(
"March",31),(
"April",30),(
"May",31),(
"June",30),(
"July",31),(
"August",31),(
"September",30),(
"October",31),(
"November",30),(
"December",31)],(24,60,60),[
"year",
"month",
"week",
"day",
"hour",
"minute",
"second"],1)