home *** CD-ROM | disk | FTP | other *** search
-
- STRFTIME(3) UNIX Programmer's Manual STRFTIME(3)
-
- NNAAMMEE
- ssttrrffttiimmee - format date and time
-
- SSYYNNOOPPSSIISS
- ##iinncclluuddee <<ssyyss//ttyyppeess..hh>>
- ##iinncclluuddee <<ttiimmee..hh>>
- ##iinncclluuddee <<ssttrriinngg..hh>>
-
- _s_i_z_e___t
- ssttrrffttiimmee(_c_h_a_r _*_b_u_f, _s_i_z_e___t _m_a_x_s_i_z_e, _c_o_n_s_t _c_h_a_r _*_f_o_r_m_a_t,
- _c_o_n_s_t _s_t_r_u_c_t _t_m _*_t_i_m_e_p_t_r)
-
- DDEESSCCRRIIPPTTIIOONN
- The ssttrrffttiimmee() function formats the information from _t_i_m_e_p_t_r into the
- buffer _b_u_f according to the string pointed to by _f_o_r_m_a_t.
-
- The _f_o_r_m_a_t string consists of zero or more conversion specifications and
- ordinary characters. All ordinary characters are copied directly into
- the buffer. A conversion specification consists of a percent sign
- ```%''' and one other character.
-
- No more than _m_a_x_s_i_z_e characters will be placed into the array. If the
- total number of resulting characters, including the terminating null
- character, is not more than _m_a_x_s_i_z_e, ssttrrffttiimmee() returns the number of
- characters in the array, not counting the terminating null. Otherwise,
- zero is returned.
-
- Each conversion specification is replaced by the characters as follows
- which are then copied into the buffer.
-
- %%AA is replaced by the full weekday name.
-
- %%aa is replaced by the abbreviated weekday name, where the abbreviation
- is the first three characters.
-
- %%BB is replaced by the full month name.
-
- %%bb oorr %%hh
- is replaced by the abbreviated month name, where the abbreviation
- is the first three characters.
-
- %%CC is equivalent to ``%a %b %e %H:%M:%S %Y'' (the format produced by
- asctime(3).
-
- %%cc is equivalent to ``%m/%d/%y''.
-
- %%DD is replaced by the date in the format ```mm/dd/yy'''.
-
- %%dd is replaced by the day of the month as a decimal number (0131).
-
- %%ee is replaced by the day of month as a decimal number (131); single
- digits are preceded by a blank.
-
- %%HH is replaced by the hour (24hour clock) as a decimal number
- (0023).
-
- %%II is replaced by the hour (12hour clock) as a decimal number
- (0112).
-
- %%jj is replaced by the day of the year as a decimal number (001366).
-
- %%kk is replaced by the hour (24hour clock) as a decimal number (023);
-
- single digits are preceded by a blank.
-
- %%ll is replaced by the hour (12hour clock) as a decimal number (112);
- single digits are preceded by a blank.
-
- %%MM is replaced by the minute as a decimal number (0059).
-
- %%mm is replaced by the month as a decimal number (0112).
-
- %%nn is replaced by a newline.
-
- %%pp is replaced by either ``AM'' or ``PM'' as appropriate.
-
- %%RR is equivalent to ``%H:%M''
-
- %%rr is equivalent to ``%I:%M:%S %p''.
-
- %%tt is replaced by a tab.
-
- %%SS is replaced by the second as a decimal number (0060).
-
- %%ss is replaced by the number of seconds since the Epoch, UCT (see
- mktime(3)).
-
- %%TT or %%XX
- is equivalent to ``%H:%M:%S''.
-
- %%UU is replaced by the week number of the year (Sunday as the first day
- of the week) as a decimal number (0053).
-
- %%WW is replaced by the week number of the year (Monday as the first day
- of the week) as a decimal number (0053).
-
- %%ww is replaced by the weekday (Sunday as the first day of the week) as
- a decimal number (06).
-
- %%xx is equivalent to ``%m/%d/%y %H:%M:%S''.
-
- %%YY is replaced by the year with century as a decimal number.
-
- %%yy is replaced by the year without century as a decimal number
- (0099).
-
- %%ZZ is replaced by the time zone name.
-
- %%%% is replaced by `%'.
-
- SSEEEE AALLSSOO
- date(1), ctime(3), printf(1), printf(3)
-
- SSTTAANNDDAARRDDSS
- The ssttrrffttiimmee() function conforms to ANSI C3.1591989 (``ANSI C''). The
- `%s' conversion specification is an extension.
-
- BBUUGGSS
- There is no conversion specification for the phase of the moon.
-
- BSD Experimental June 29, 1991 2
-
-
-
-
-
-
-
-
-