home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3c / strftime.z / strftime
Encoding:
Text File  |  2002-10-03  |  13.3 KB  |  198 lines

  1.  
  2.  
  3.  
  4. ssssttttrrrrffffttttiiiimmmmeeee((((3333CCCC))))                                                      ssssttttrrrrffffttttiiiimmmmeeee((((3333CCCC))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee, _cccc_ffff_tttt_iiii_mmmm_eeee, _aaaa_ssss_cccc_ffff_tttt_iiii_mmmm_eeee - convert date and time to string
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_tttt_iiii_mmmm_eeee_...._hhhh_>>>>
  13.  
  14.      _ssss_iiii_zzzz_eeee______tttt _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee _((((_cccc_hhhh_aaaa_rrrr _****_ssss_,,,, _ssss_iiii_zzzz_eeee______tttt _mmmm_aaaa_xxxx_ssss_iiii_zzzz_eeee_,,,, _cccc_oooo_nnnn_ssss_tttt _cccc_hhhh_aaaa_rrrr _****_ffff_oooo_rrrr_mmmm_aaaa_tttt_,,,,
  15.          _cccc_oooo_nnnn_ssss_tttt _ssss_tttt_rrrr_uuuu_cccc_tttt _tttt_mmmm _****_tttt_iiii_mmmm_eeee_pppp_tttt_rrrr_))))_;;;;
  16.  
  17.      _iiii_nnnn_tttt _cccc_ffff_tttt_iiii_mmmm_eeee _((((_cccc_hhhh_aaaa_rrrr _****_ssss_,,,, _cccc_hhhh_aaaa_rrrr _****_ffff_oooo_rrrr_mmmm_aaaa_tttt_,,,, _cccc_oooo_nnnn_ssss_tttt _tttt_iiii_mmmm_eeee______tttt _****_cccc_llll_oooo_cccc_kkkk_))))_;;;;
  18.  
  19.      _iiii_nnnn_tttt _aaaa_ssss_cccc_ffff_tttt_iiii_mmmm_eeee _((((_cccc_hhhh_aaaa_rrrr _****_ssss_,,,, _cccc_oooo_nnnn_ssss_tttt _cccc_hhhh_aaaa_rrrr _****_ffff_oooo_rrrr_mmmm_aaaa_tttt_,,,, _cccc_oooo_nnnn_ssss_tttt _ssss_tttt_rrrr_uuuu_cccc_tttt _tttt_mmmm
  20.          _****_tttt_iiii_mmmm_eeee_pppp_tttt_rrrr_))))_;;;;
  21.  
  22. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  23.      _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee, _aaaa_ssss_cccc_ffff_tttt_iiii_mmmm_eeee, and _cccc_ffff_tttt_iiii_mmmm_eeee place characters into the array pointed to
  24.      by _ssss as controlled by the string pointed to by _f_o_r_m_a_t.  The _f_o_r_m_a_t string
  25.      consists of zero or more directives and ordinary characters.  All
  26.      ordinary characters (including the terminating null character) are copied
  27.      unchanged into the array.  For _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee, no more than _m_a_x_s_i_z_e characters
  28.      are placed into the array.
  29.  
  30.      If _f_o_r_m_a_t is (char *)0, then the locale's default format is used.  For
  31.      _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee the default format is the same as _""""_%%%%_KKKK_CCCC_"""", for _cccc_ffff_tttt_iiii_mmmm_eeee and _aaaa_ssss_cccc_ffff_tttt_iiii_mmmm_eeee
  32.      the default format is the same as _""""_%%%%_KKKK_CCCC_"""".  _cccc_ffff_tttt_iiii_mmmm_eeee and _aaaa_ssss_cccc_ffff_tttt_iiii_mmmm_eeee first try
  33.      to use the value of the environment variable _CCCC_FFFF_TTTT_IIII_MMMM_EEEE, and if that is
  34.      undefined or empty, the default format is used.
  35.  
  36.      Each directive is replaced by appropriate characters as described in the
  37.      following list.  The appropriate characters are determined by the _LLLL_CCCC______TTTT_IIII_MMMM_EEEE
  38.      category of the program's locale and by the values contained in the
  39.      structure pointed to by _t_i_m_e_p_t_r for _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee and _aaaa_ssss_cccc_ffff_tttt_iiii_mmmm_eeee, and by the
  40.      time represented by _c_l_o_c_k for _cccc_ffff_tttt_iiii_mmmm_eeee.
  41.  
  42.      _%%%%_%%%%        same as %
  43.      _%%%%_aaaa        locale's abbreviated weekday name
  44.      _%%%%_AAAA        locale's full weekday name
  45.      _%%%%_bbbb        locale's abbreviated month name
  46.      _%%%%_BBBB        locale's full month name
  47.      _%%%%_cccc        locale's appropriate date and time representation
  48.      _%%%%_CCCC        century number (the year divided by 100 and truncated to an
  49.                integer) as a decimal number [00-99]
  50.      _%%%%_dddd        day of month ( 01 - 31 )
  51.      _%%%%_DDDD        date as _%%%%_mmmm_////_%%%%_dddd_////_%%%%_yyyy
  52.      _%%%%_eeee        day of month (1-31; single digits are preceded by a blank)
  53.      _%%%%_FFFF        equivalent to the "%Y-%m-%d" ISO 8601 date format.
  54.      _%%%%_gggg        The year within the century based on the ISO 8601 week.  This
  55.                is a decimal ranging from '00' to '99'.  See '%V' for
  56.                information on the ISO 8601 week.
  57.      _%%%%_GGGG        The year based on the ISO 8601 week.  This is a four digit
  58.                decimal number.  See '%V' for information on the ISO 8601 week.
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ssssttttrrrrffffttttiiiimmmmeeee((((3333CCCC))))                                                      ssssttttrrrrffffttttiiiimmmmeeee((((3333CCCC))))
  71.  
  72.  
  73.  
  74.      _%%%%_hhhh        locale's abbreviated month name.
  75.      _%%%%_HHHH        hour ( 00 - 23 )
  76.      _%%%%_IIII        hour ( 01 - 12 )
  77.      _%%%%_jjjj        day number of year ( 001 - 366 )
  78.      _%%%%_KKKK_CCCC       locale's appropriate date and time representation
  79.      _%%%%_mmmm        month number ( 01 - 12 )
  80.      _%%%%_MMMM        minute ( 00 - 59 )
  81.      _%%%%_nnnn        same as new-line
  82.      _%%%%_pppp        locale's equivalent of either AM or PM
  83.      _%%%%_rrrr        locale's 12-hour time representation, default _%%%%_IIII_::::_%%%%_MMMM_::::_%%%%_SSSS [_AAAA_MMMM|_PPPP_MMMM]
  84.      _%%%%_RRRR        time as _%%%%_HHHH_::::_%%%%_MMMM
  85.      _%%%%_SSSS        seconds ( 00 - 61 ), allows for leap seconds
  86.      _%%%%_tttt        same as a tab
  87.      _%%%%_TTTT        time as _%%%%_HHHH_::::_%%%%_MMMM_::::_%%%%_SSSS
  88.      _%%%%_UUUU        week number of year ( 00 - 53 ), Sunday is the first day of
  89.                week 1
  90.      _%%%%_VVVV        The ISO 8601:1988 week number.  The replacement is a decimal
  91.                number ranging from '00' to '53'.  Each ISO 8601:1988 week
  92.                starts on Monday and the first week of the year is the week
  93.                which has a majority of its days in that year.  Note that the
  94.                first or last week of the year may or may not have all of its
  95.                days fall into its respective year.  The first week of the
  96.                current year may begin in the previous year or the last week of
  97.                the previous year may end in the current year.
  98.      _%%%%_wwww        weekday number ( 0 - 6 ), Sunday = 0
  99.      _%%%%_WWWW        week number of year ( 00 - 53 ), Monday is the first day of
  100.                week 1
  101.      _%%%%_xxxx        locale's appropriate date representation
  102.      _%%%%_XXXX        locale's appropriate time representation
  103.      _%%%%_yyyy        year within century ( 00 - 99 )
  104.      _%%%%_YYYY        year as ccyy ( e.g. 1986)
  105.      _%%%%_ZZZZ        time zone name or no characters if no time zone exists
  106.  
  107.      The difference between _%%%%_UUUU and _%%%%_WWWW lies in which day is counted as the
  108.      first of the week.  Week number 01 is the first week in January starting
  109.      with a Sunday for _%%%%_UUUU or a Monday for _%%%%_WWWW.  Week number 00 contains those
  110.      days before the first Sunday or Monday in January for _%%%%_UUUU and _%%%%_WWWW,
  111.      respectively.
  112.  
  113.      _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee, _cccc_ffff_tttt_iiii_mmmm_eeee, and _aaaa_ssss_cccc_ffff_tttt_iiii_mmmm_eeee return the number of characters placed
  114.      into the array pointed to by _s not including the terminating null
  115.      character.  (If more than _m_a_x_s_i_z_e characters would have been placed into
  116.      the array, _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee returns zero and the array content is indeterminate.
  117.      If _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee, _cccc_ffff_tttt_iiii_mmmm_eeee, or _aaaa_ssss_cccc_ffff_tttt_iiii_mmmm_eeee overrun the size of the array, the
  118.      behavior is undefined.)
  119.  
  120.    SSSSeeeelllleeeeccccttttiiiinnnngggg tttthhhheeee OOOOuuuuttttppppuuuutttt''''ssss LLLLaaaannnngggguuuuaaaaggggeeee
  121.      By default, the output of _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee, _cccc_ffff_tttt_iiii_mmmm_eeee, and _aaaa_ssss_cccc_ffff_tttt_iiii_mmmm_eeee appear in U.S.
  122.      English.  The user can request that the output of _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee, _cccc_ffff_tttt_iiii_mmmm_eeee, or
  123.      _aaaa_ssss_cccc_ffff_tttt_iiii_mmmm_eeee be in a specific language by setting the _l_o_c_a_l_e for _c_a_t_e_g_o_r_y
  124.      _LLLL_CCCC______TTTT_IIII_MMMM_EEEE in _ssss_eeee_tttt_llll_oooo_cccc_aaaa_llll_eeee.
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ssssttttrrrrffffttttiiiimmmmeeee((((3333CCCC))))                                                      ssssttttrrrrffffttttiiiimmmmeeee((((3333CCCC))))
  137.  
  138.  
  139.  
  140.    TTTTiiiimmmmeeeezzzzoooonnnneeee
  141.      The timezone is taken from the environment variable _TTTT_ZZZZ [see _cccc_tttt_iiii_mmmm_eeee(3C) for
  142.      a description of _TTTT_ZZZZ].
  143.  
  144. EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  145.      The example illustrates the use of _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee.  It shows what the string in
  146.      _ssss_tttt_rrrr would look like if the structure pointed to by _t_m_p_t_r contains the
  147.      values corresponding to Thursday, August 28, 1986 at 12:44:36 in New
  148.      Jersey.
  149.                _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee _((((_ssss_tttt_rrrr_,,,, _ssss_tttt_rrrr_ssss_iiii_zzzz_eeee_,,,, _""""_%%%%_AAAA _%%%%_bbbb _%%%%_dddd _%%%%_jjjj_""""_,,,, _tttt_mmmm_pppp_tttt_rrrr_))))
  150.      This results in _ssss_tttt_rrrr containing _""""_TTTT_hhhh_uuuu_rrrr_ssss_dddd_aaaa_yyyy _AAAA_uuuu_gggg _2222_8888 _2222_4444_0000_"""".
  151.  
  152. FFFFIIIILLLLEEEESSSS
  153.      _////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_llll_oooo_cccc_aaaa_llll_eeee_////_l_o_c_a_l_e_////_LLLL_CCCC______TTTT_IIII_MMMM_EEEE - file containing locale-specific date and
  154.      time information
  155.  
  156. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  157.      _tttt_iiii_mmmm_eeee_((((_2222_)))), _cccc_tttt_iiii_mmmm_eeee(3C), _gggg_eeee_tttt_eeee_nnnn_vvvv(3C), _ssss_eeee_tttt_llll_oooo_cccc_aaaa_llll_eeee(3C), _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee(4), _tttt_iiii_mmmm_eeee_zzzz_oooo_nnnn_eeee(4),
  158.      _eeee_nnnn_vvvv_iiii_rrrr_oooo_nnnn(5).
  159.  
  160. NNNNOOOOTTTTEEEE
  161.      _cccc_ffff_tttt_iiii_mmmm_eeee and _aaaa_ssss_cccc_ffff_tttt_iiii_mmmm_eeee are obsolete.  _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee should be used instead.
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.                                                                         PPPPaaaaggggeeee 3333
  195.  
  196.  
  197.  
  198.