Branch: Tag:

2001-04-27

2001-04-27 16:57:17 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Converted markup to AutoDoc mk II.

Rev: lib/modules/Calendar.pmod/Calendar.pike:1.4
Rev: lib/modules/Calendar.pmod/Coptic.pmod:1.4
Rev: lib/modules/Calendar.pmod/Discordian.pmod:1.5
Rev: lib/modules/Calendar.pmod/Event.pmod:1.12
Rev: lib/modules/Calendar.pmod/Gregorian.pmod:1.5
Rev: lib/modules/Calendar.pmod/ISO.pmod:1.5
Rev: lib/modules/Calendar.pmod/Islamic.pmod:1.5
Rev: lib/modules/Calendar.pmod/Julian.pmod:1.6
Rev: lib/modules/Calendar.pmod/Roman.pmod:1.4
Rev: lib/modules/Calendar.pmod/Ruleset.pike:1.8
Rev: lib/modules/Calendar.pmod/Stardate.pmod:1.6
Rev: lib/modules/Calendar.pmod/Swedish.pmod:1.5
Rev: lib/modules/Calendar.pmod/TZnames.pmod:1.8
Rev: lib/modules/Calendar.pmod/Time.pmod:1.12
Rev: lib/modules/Calendar.pmod/TimeRanges.pmod:1.16
Rev: lib/modules/Calendar.pmod/Timezone.pmod:1.17
Rev: lib/modules/Calendar.pmod/YMD.pmod:1.30
Rev: lib/modules/Calendar_I.pmod/Gregorian.pmod:1.26
Rev: lib/modules/Calendar_I.pmod/Stardate.pmod:1.3
Rev: lib/modules/Calendar_I.pmod/module.pmod:1.8

1: - //! module Calendar - //! submodule Stardate +    //! This implements TNG stardates.      #pike __REAL_VERSION__
16:   string calendar_name() { return "Stardate"; }      function(mixed...:cTick) Tick=cTick; +  + //! Stardate clock tick.   class cTick   {    inherit TimeRange;
25:    float t;    float len;    - //! method void create(mixed ...) - //! method void create(int|float date) - //! method void create() +  //! @decl void create(mixed ... args) +  //! @decl void create(int|float date) +  //! @decl void create()    //! 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.    //! - //! You can also omit any arguments to create now. +  //! You can also omit any arguments to @[create()].    //! - //! known bugs: +  //! @bugs    //! Since the precision is limited to the float type    //! of pike you can get non-precise results:    //! - //! <pre> +  //! @pre{    //! > 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> -  -  +  //! @}    void create(mixed ...args)    {    switch (sizeof(args))
95:    len=0.0;    }    - // method float tic() - // This gives back the start of the stardate period, - // as a float. -  +  //! This gives back the start of the stardate period, +  //! as a float.    float tic()    {    return t;    }    - //! method float tics() +     //! This gives back the number of stardate tics    //! in the period. -  +     float tics()    {    return len;    }    - //! method int number_of_seconds() - //! method int number_of_days() - //! This gives back the Gregorian/Earth/ISO number of seconds +  //! @decl int number_of_seconds() +  //! @decl int number_of_days() +  //! These return the Gregorian/Earth/ISO number of seconds   //! and number of days, for convinience and conversion to   //! other calendars.   
270:    return sprintf("%.3f",t);    }    - //! string format_long() - //! string format_short() - //! string format_vshort() +  //! @decl string format_long() +  //! @decl string format_short() +  //! @decl string format_vshort()    //! Format the stardate tick nicely. - //! <pre> +  //! @pre{    //! long "-322537.312"    //! short "77463.312" (w/o >100000-component)    //! short "7463.312" (w/o >10000-component) - //! </pre> +  //! @}       string format_long()    {
306:   // global convinience functions   //------------------------------------------------------------------------    - //! method TimeofDay now() +    //! Give the zero-length time period of the   //! current time. -  +    TimeofDay now()   {    return Tick();   }