Branch: Tag:

2000-09-27

2000-09-27 08:28:10 by Mirar (Pontus Hagland) <pike@sort.mirar.org>

I have no idea why Hubbe reverted the Stardate.pmod to the Calendar I one, but I'll recheck in the 1.1 version of the Calendar II stardate again...

Rev: lib/modules/Calendar.pmod/Stardate.pmod:1.3

2221:   <module name='Stardate'>   <doc>   <text> - <p>time unit: TNGDate</p> + <p>This implements TNG stardates.</p>   </text>      </doc> - <class name='TNGDate'> - <doc> + <docgroup homogen-name='create' homogen-type='method'> + <method name='create'> +  <returntype> +  <object>void </object></returntype> +  <arguments><argument name='...'><type><mixed/></type></argument> +  +  </arguments> + </method><method name='create'> +  <returntype> +  <object>void </object></returntype> +  <arguments><argument name='date'><type> +  <or><int/><float/></or></type></argument> +  +  </arguments> + </method><method name='create'> +  <returntype> +  <object>void </object></returntype> +  <arguments> +  </arguments> + </method><doc>   <text> - <p>implements ST:TNG stardates - can be used as create argument to Day</p> + <p> Apart from the standard creation methods +  (julian day, etc), you can create a stardate +  from the stardate number. The length +  of the period will then be zero.</p> +  + <p> You can also omit any arguments to create now.</p> +  + <p>known bugs: +  Since the precision is limited to the float type +  of pike you can get non-precise results:</p> +  + <p> <pre> +  &gt; Calendar.Second(Calendar.Stardate.Day(Calendar.Year())); +  Result: Second(Fri 31 Dec 1999 23:59:18 CET - Sun 31 Dec 2000 23:59:18 CET) +  </pre></p>   </text>      </doc> - </class> + </docgroup> + <docgroup homogen-name='now' homogen-type='method'> + <method name='now'> +  <returntype> +  <object>TimeofDay </object></returntype> +  <arguments> +  </arguments> + </method><doc> + <text> + <p>Give the zero-length time period of the + current time.</p> + </text> +  + </doc> + </docgroup> + <docgroup homogen-type='method'> + <method name='number_of_seconds'> +  <returntype> +  <object>int </object></returntype> +  <arguments> +  </arguments> + </method><method name='number_of_days'> +  <returntype> +  <object>int </object></returntype> +  <arguments> +  </arguments> + </method><doc> + <text> + <p> This gives back the Gregorian/Earth/ISO number of seconds +  and number of days, for convinience and conversion to +  other calendars. + string format_long() + string format_short() + string format_vshort() +  Format the stardate tick nicely. +  <pre> +  long "-322537.312" +  short "77463.312" (w/o &gt;100000-component) +  short "7463.312" (w/o &gt;10000-component) +  </pre></p> + </text> +  + </doc> + </docgroup> + <docgroup homogen-name='tics' homogen-type='method'> + <method name='tics'> +  <returntype> +  <object>float </object></returntype> +  <arguments> +  </arguments> + </method><doc> + <text> + <p>This gives back the number of stardate tics + in the period.</p> + </text> +  + </doc> + </docgroup>   </module>   <class name='SuperTimeRange'>   <doc>