Viva Clipper !

CT_CToDoW()

Advertisements
  NAME :
     CToDoW()
  CATEGORY :
     CT3 date and time functions
  ONELINER :
     Convert name of day of the week to its ordinal number
  SYNTAX :
     CToDoW( <cDayName> ) -> <nOrdinal>
  ARGUMENT :
     <cDayName> : Name of day to convert to ordinal number
  RETURN :
     <nOrdinal> : Ordinal number of <cDayName>
  EXAMPLE :
 PROC MAIN()
    SETMODE( 25, 80 )
    CLS
    SET DATE GERM
    SET CENT ON
    ? "CTODOW('Sunday') :", CTODOW('Sunday') // 1
    *  Show several ways to get the day of
    *  the week for Wednesday:
    ? "CTODOW('WEDNESDAY') :", CTODOW('WEDNESDAY')      // 4
    ? "CTODOW('Wednesday') :", CTODOW('Wednesday')      // 4
    ? "CTODOW('Wed') :",CTODOW('Wed')                   //  4
    *  What number of the day of the week is Monday?
    ? "CTODOW( 'M' ) :", CTODOW( 'M' ) //  2
    ?
    WAIT "EOF CTODOW.prg"
 RETURN // MAIN
  COMPLIANCE :
     CToDoW() is compatible with CT3's CToDoW()
  PLATFORMS :
     All
  FILES :
     Library is hbct.
  SEE ALSO :
     NToCDoW()


Advertisements

Advertisements