Changeset 2808 in Sophya for trunk/SophyaLib/NTools/datime.h


Ignore:
Timestamp:
Jun 14, 2005, 1:25:05 PM (20 years ago)
Author:
ansari
Message:

MAJ documentation - Reza 14/6/2005

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/NTools/datime.h

    r220 r2808  
    1010
    1111
     12/*!
     13  \ingroup NTools
     14  \file datime.h
     15  Set of C functions and macros to manipulate date and time + Sidereal time.
     16  \sa datime.c
     17  \warning : If possible, use class SOPHYA::TimeStamp
     18*/
     19/*!
     20  \ingroup NTools
     21  \brief Structure JMA pour representer une date (Jour, Mois Annee) */
    1222typedef struct
    1323  {
     
    1727  }  JMA ;
    1828
    19 
     29/*!
     30  \ingroup NTools
     31  \brief Structure HMS pour representer une heure (Heure, Minute Seconde)
     32*/
    2033typedef struct
    2134  {
     
    2538  } HMS ;
    2639
     40/* \cond
    2741/*   ----------    2) Donnees constantes  ---------- */
    2842#ifdef  DATIMEPRIVEE
     
    4357#endif
    4458
     59/* \endcond */
    4560/*    ------ 3) Macro de manipulation de date et heure  -------  */
    46 
    4761#define  NomJour(d)      (NomJo[NumJour(d)-1])
    4862#define  NomMois(d)      (NomMo[d.Mois-1])
    4963
    50 /*   Chaine de forme  hh:mm:sec  <->  structure HMS   */
     64/*        Chaine de forme  hh:mm:sec  <->  structure HMS   */
     65/*! \brief  Decodage de Chaine de forme  hh:mm:sec   ->  structure HMS   */
    5166#define  StrgtoHMS(s,h)  ( sscanf(s,"%d:%d:%lf", &(h.Heures),&(h.Minutes),&(h.Secondes)) )
     67/*! \brief  structure HMS -> Chaine de forme  hh:mm:sec  */
    5268#define  HMStoStrg(h,s)  ( sprintf(s,"%02d:%02d:%02.0f", h.Heures,h.Minutes,h.Secondes) )
    5369
     
    5571/* EA 140998, machin infame pour que ca marche pour 1998/09/14... Pourquoi avoir fait */
    5672/* des macros ??????????????????????????????????????????????????????????????????????? */
     73/*!  \brief Chaine de caracteres sous forme de dd/mm/aaaa -> structure JMA jma. */
    5774#define  StrgtoJMA(strg,j)  ( sscanf(strg,"%d/%d/%d", &(j.Jour),&(j.Mois),&(j.Annee)),\
    5875    (j.Jour>1900 ? sscanf(strg,"%d/%d/%d", &(j.Annee),&(j.Mois),&(j.Jour)) : 1) )
    59 
     76/*! \brief structure JMA -> Chaine de forme jj/mm/aa       */
    6077#define  JMAtoStrg(j,strg)  ( sprintf(strg,"%02d/%02d/%4d", j.Jour,j.Mois,j.Annee) )
     78/*! \brief structure JMA -> Chaine de forme jj/mm/aa       */
    6179#define  JMAtoStrgLong(j,strg)   ( sprintf(strg,"%s , %d %s %d", NomJo[NumJour(j)-1], j.Jour, NomMo[j.Mois-1], j.Annee) )
    6280
Note: See TracChangeset for help on using the changeset viewer.