Print this page
Garrett's man page edits.
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3c/strftime.3c
+++ new/usr/src/man/man3c/strftime.3c
1 1 '\" te
2 +.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
2 3 .\" Copyright (c) 2014 Gary Mills
3 4 .\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved.
4 5 .\" Copyright 1989 AT&T
5 6 .\" Portions Copyright (c) 1992, X/Open Company Limited. All Rights Reserved.
6 7 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
7 8 .\" http://www.opengroup.org/bookstore/.
8 9 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
9 10 .\" This notice shall appear on any product containing this material.
10 11 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
11 12 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
12 13 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
13 -.TH STRFTIME 3C "Jan 3, 2014"
14 +.TH STRFTIME 3C "Jun 24, 2014"
14 15 .SH NAME
15 16 strftime, strftime_l cftime, ascftime \- convert date and time to string
16 17 .SH SYNOPSIS
17 18 .LP
18 19 .nf
19 20 #include <time.h>
20 21
21 22 \fBsize_t\fR \fBstrftime\fR(\fBchar *restrict\fR \fIs\fR, \fBsize_t\fR \fImaxsize\fR,
22 23 \fBconst char *restrict\fR \fIformat\fR,
23 24 \fBconst struct tm *restrict\fR \fItimeptr\fR);
25 +.fi
26 +.LP
27 +.nf
24 28 \fBsize_t\fR \fBstrftime_l\fR(\fBchar *restrict\fR \fIs\fR, \fBsize_t\fR \fImaxsize\fR,
25 29 \fBconst char *restrict\fR \fIformat\fR,
26 30 \fBconst struct tm *restrict\fR \fItimeptr\fR, \fBlocale_t\fR \fIloc\fR);
27 31 .fi
28 -
29 32 .LP
30 33 .nf
31 34 \fBint\fR \fBcftime\fR(\fBchar *\fR\fIs\fR, \fBchar *\fR\fIformat\fR, \fBconst time_t *\fR\fIclock\fR);
32 35 .fi
33 -
34 36 .LP
35 37 .nf
36 38 \fBint\fR \fBascftime\fR(\fBchar *\fR\fIs\fR, \fBconst char *\fR\fIformat\fR,
37 39 \fBconst struct tm *\fR\fItimeptr\fR);
38 40 .fi
39 41
40 42 .SH DESCRIPTION
41 43 .sp
42 44 .LP
43 -The \fBstrftime()\fR, \fBascftime()\fR, and \fBcftime()\fR functions place
45 +The \fBstrftime()\fR, \fBstrftime_l()\fR, \fBascftime()\fR, and \fBcftime()\fR
46 +functions place
44 47 bytes into the array pointed to by \fIs\fR as controlled by the string pointed
45 48 to by \fIformat\fR. The \fIformat\fR string consists of zero or more conversion
46 49 specifications and ordinary characters. A conversion specification consists of
47 50 a '\fB%\fR' (percent) character and one or two terminating conversion
48 51 characters that determine the conversion specification's behavior. All
49 52 ordinary characters (including the terminating null byte) are copied unchanged
50 53 into the array pointed to by \fIs\fR. If copying takes place between objects
51 54 that overlap, the behavior is undefined. For \fBstrftime()\fR, no more than
52 55 \fImaxsize\fR bytes are placed into the array. The \fBstrftime_l()\fR function
53 56 behaves identically to \fBstrftime()\fR function, but instead of operating in
54 57 the current locale, it operates in the locale specified by \fIloc\fR.
55 -.sp
56 58 .LP
57 59 If \fIformat\fR is \fB(char *)0\fR, then the locale's default format is used.
58 60 For \fBstrftime()\fR the default format is the same as \fB%c\fR; for
59 61 \fBcftime()\fR and \fBascftime()\fR the default format is the same as \fB%+\fR.
60 62 \fBcftime()\fR and \fBascftime()\fR first try to use the value of the
61 63 environment variable \fBCFTIME\fR, and if that is undefined or empty, the
62 64 default format is used.
63 -.sp
64 65 .LP
65 66 Each conversion specification is replaced by appropriate characters as
66 67 described in the following list. The appropriate characters are determined by
67 68 the \fBLC_TIME\fR category of the program's locale and by the values contained
68 69 in the structure pointed to by \fItimeptr\fR for \fBstrftime()\fR and
69 70 \fBascftime()\fR, and by the time represented by \fIclock\fR for
70 71 \fBcftime()\fR.
71 72 .sp
72 73 .ne 2
73 74 .na
74 75 \fB\fB%%\fR\fR
75 76 .ad
76 77 .RS 6n
77 78 Same as \fB%\fR.
78 79 .RE
79 80
80 81 .sp
81 82 .ne 2
82 83 .na
83 84 \fB\fB%a\fR\fR
84 85 .ad
85 86 .RS 6n
86 87 Locale's abbreviated weekday name.
87 88 .RE
88 89
89 90 .sp
90 91 .ne 2
91 92 .na
92 93 \fB\fB%A\fR\fR
93 94 .ad
94 95 .RS 6n
95 96 Locale's full weekday name.
96 97 .RE
97 98
98 99 .sp
99 100 .ne 2
100 101 .na
101 102 \fB\fB%b\fR\fR
102 103 .ad
103 104 .RS 6n
104 105 Locale's abbreviated month name.
105 106 .RE
106 107
107 108 .sp
108 109 .ne 2
109 110 .na
110 111 \fB\fB%B\fR\fR
111 112 .ad
112 113 .RS 6n
113 114 Locale's full month name.
114 115 .RE
115 116
116 117 .sp
117 118 .ne 2
118 119 .na
119 120 \fB\fB%c\fR\fR
120 121 .ad
121 122 .RS 6n
122 123 Locale's appropriate date and time representation.
123 124 In the C locale, this format is:
124 125 .sp
125 126 .in +2
126 127 .nf
127 128 %a %b %e %H:%M:%S %Y
128 129 .fi
129 130 .in -2
130 131 .sp
131 132 Other locales may have different locale-specific formats.
132 133 .RE
133 134
134 135 .sp
135 136 .ne 2
136 137 .na
137 138 \fB\fB%C\fR\fR
138 139 .ad
139 140 .RS 6n
140 141 Century number (the year divided by 100 and truncated to an integer as a
141 142 decimal number [01,99]).
142 143 .RE
143 144
144 145 .sp
145 146 .ne 2
146 147 .na
147 148 \fB\fB%d\fR\fR
148 149 .ad
149 150 .RS 6n
150 151 Day of month [01,31].
151 152 .RE
152 153
153 154 .sp
154 155 .ne 2
155 156 .na
156 157 \fB\fB%D\fR\fR
157 158 .ad
158 159 .RS 6n
159 160 Date as \fB%m\fR/\fB%d\fR/\fB%y\fR.
160 161 .RE
161 162
162 163 .sp
163 164 .ne 2
164 165 .na
165 166 \fB\fB%e\fR\fR
166 167 .ad
167 168 .RS 6n
168 169 Day of month [1,31]; single digits are preceded by a space.
169 170 .RE
170 171
171 172 .sp
172 173 .ne 2
173 174 .na
174 175 \fB\fB%F\fR\fR
175 176 .ad
176 177 .RS 6n
177 178 Equivalent to \fB%Y\fR-\fB%m\fR-\fB%d\fR (the ISO 8601:2000 standard date
178 179 format).
179 180 .RE
180 181
181 182 .sp
182 183 .ne 2
183 184 .na
184 185 \fB\fB%g\fR\fR
185 186 .ad
186 187 .RS 6n
187 188 Week-based year within century [00,99].
188 189 .RE
189 190
190 191 .sp
191 192 .ne 2
192 193 .na
193 194 \fB\fB%G\fR\fR
194 195 .ad
195 196 .RS 6n
196 197 Week-based year, including the century [0000,9999].
197 198 .RE
198 199
199 200 .sp
200 201 .ne 2
201 202 .na
202 203 \fB\fB%h\fR\fR
203 204 .ad
204 205 .RS 6n
205 206 Locale's abbreviated month name.
206 207 .RE
207 208
208 209 .sp
209 210 .ne 2
210 211 .na
211 212 \fB\fB%H\fR\fR
212 213 .ad
213 214 .RS 6n
214 215 Hour (24-hour clock) [00,23].
215 216 .RE
216 217
217 218 .sp
218 219 .ne 2
219 220 .na
220 221 \fB\fB%I\fR\fR
221 222 .ad
222 223 .RS 6n
223 224 Hour (12-hour clock) [01,12].
224 225 .RE
225 226
226 227 .sp
227 228 .ne 2
228 229 .na
229 230 \fB\fB%j\fR\fR
230 231 .ad
231 232 .RS 6n
232 233 Day number of year [001,366].
233 234 .RE
234 235
235 236 .sp
236 237 .ne 2
237 238 .na
238 239 \fB\fB%k\fR\fR
239 240 .ad
240 241 .RS 6n
241 242 Hour (24-hour clock) [0,23]; single digits are preceded by a space.
242 243 .RE
243 244
244 245 .sp
245 246 .ne 2
246 247 .na
247 248 \fB\fB%l\fR\fR
248 249 .ad
249 250 .RS 6n
250 251 Hour (12-hour clock) [1,12]; single digits are preceded by a space.
251 252 .RE
252 253
253 254 .sp
254 255 .ne 2
255 256 .na
256 257 \fB\fB%m\fR\fR
257 258 .ad
258 259 .RS 6n
259 260 Month number [01,12].
260 261 .RE
261 262
262 263 .sp
263 264 .ne 2
264 265 .na
265 266 \fB\fB%M\fR\fR
266 267 .ad
267 268 .RS 6n
268 269 Minute [00,59].
269 270 .RE
270 271
271 272 .sp
272 273 .ne 2
273 274 .na
274 275 \fB\fB%n\fR\fR
275 276 .ad
276 277 .RS 6n
277 278 Insert a NEWLINE.
278 279 .RE
279 280
280 281 .sp
281 282 .ne 2
282 283 .na
283 284 \fB\fB%p\fR\fR
284 285 .ad
285 286 .RS 6n
286 287 Locale's equivalent of either a.m. or p.m.
287 288 .RE
288 289
289 290 .sp
290 291 .ne 2
291 292 .na
292 293 \fB\fB%r\fR\fR
293 294 .ad
294 295 .RS 6n
295 296 Appropriate time representation in 12-hour clock format with \fB%p\fR.
296 297 .RE
297 298
298 299 .sp
299 300 .ne 2
300 301 .na
301 302 \fB\fB%R\fR\fR
302 303 .ad
303 304 .RS 6n
304 305 Time as \fB%H\fR:\fB%M\fR.
305 306 .RE
306 307
307 308 .sp
308 309 .ne 2
309 310 .na
310 311 \fB\fB%s\fR\fR
311 312 .ad
312 313 .RS 6n
313 314 Seconds since 00:00:00 UTC, January 1, 1970.
314 315 .RE
315 316
316 317 .sp
317 318 .ne 2
318 319 .na
319 320 \fB\fB%S\fR\fR
320 321 .ad
321 322 .RS 6n
322 323 Seconds [00,60]; the range of values is [00,60] rather than [00,59] to allow
323 324 for the occasional leap second.
324 325 .RE
325 326
326 327 .sp
327 328 .ne 2
328 329 .na
329 330 \fB\fB%t\fR\fR
330 331 .ad
331 332 .RS 6n
332 333 Insert a TAB.
333 334 .RE
334 335
335 336 .sp
336 337 .ne 2
337 338 .na
338 339 \fB\fB%T\fR\fR
339 340 .ad
340 341 .RS 6n
341 342 Time as \fB%H\fR:\fB%M\fR:\fB%S\fR.
342 343 .RE
343 344
344 345 .sp
345 346 .ne 2
346 347 .na
347 348 \fB\fB%u\fR\fR
348 349 .ad
349 350 .RS 6n
350 351 Weekday as a decimal number [1,7], with 1 representing Monday. See \fBNOTES\fR
351 352 below.
352 353 .RE
353 354
354 355 .sp
355 356 .ne 2
356 357 .na
357 358 \fB\fB%U\fR\fR
358 359 .ad
359 360 .RS 6n
360 361 Week number of year as a decimal number [00,53], with Sunday as the first day
361 362 of week 1.
362 363 .RE
363 364
364 365 .sp
365 366 .ne 2
366 367 .na
367 368 \fB\fB%v\fR\fR
368 369 .ad
369 370 .RS 6n
370 371 Date as \fB%e\fR-\fB%b\fR-\fB%Y\fR.
371 372 .RE
372 373
373 374 .sp
374 375 .ne 2
375 376 .na
376 377 \fB\fB%V\fR\fR
377 378 .ad
378 379 .RS 6n
379 380 The ISO 8601 week number as a decimal number [01,53]. In the ISO 8601
380 381 week-based system, weeks begin on a Monday and week 1 of the year is the week
381 382 that includes both January 4th and the first Thursday of the year. If the
382 383 first Monday of January is the 2nd, 3rd, or 4th, the preceding days are part of
383 384 the last week of the preceding year. See \fBNOTES\fR below.
384 385 .RE
385 386
386 387 .sp
387 388 .ne 2
388 389 .na
389 390 \fB\fB%w\fR\fR
390 391 .ad
391 392 .RS 6n
392 393 Weekday as a decimal number [0,6], with 0 representing Sunday.
393 394 .RE
394 395
395 396 .sp
396 397 .ne 2
397 398 .na
398 399 \fB\fB%W\fR\fR
399 400 .ad
400 401 .RS 6n
401 402 Week number of year as a decimal number [00,53], with Monday as the first day
402 403 of week 1.
403 404 .RE
404 405
405 406 .sp
406 407 .ne 2
407 408 .na
408 409 \fB\fB%x\fR\fR
409 410 .ad
410 411 .RS 6n
411 412 Locale's appropriate date representation.
412 413 .RE
413 414
414 415 .sp
415 416 .ne 2
416 417 .na
417 418 \fB\fB%X\fR\fR
418 419 .ad
419 420 .RS 6n
420 421 Locale's appropriate time representation.
421 422 .RE
422 423
423 424 .sp
424 425 .ne 2
425 426 .na
426 427 \fB\fB%y\fR\fR
427 428 .ad
428 429 .RS 6n
429 430 Year within century [00,99].
430 431 .RE
431 432
432 433 .sp
433 434 .ne 2
434 435 .na
435 436 \fB\fB%Y\fR\fR
436 437 .ad
437 438 .RS 6n
438 439 Year, including the century (for example 1993).
439 440 .RE
440 441
441 442 .sp
442 443 .ne 2
443 444 .na
444 445 \fB\fB%z\fR\fR
445 446 .ad
446 447 .RS 6n
447 448 Replaced by offset from UTC in ISO 8601:2000 standard format (\fB+hhmm\fR or
448 449 \fB-hhmm\fR), or by no characters if no time zone is determinable. For example,
449 450 "-0430" means 4 hours 30 minutes behind UTC (west of Greenwich). If
450 451 \fBtm_isdst\fR is zero, the standard time offset is used. If \fBtm_isdst\fR is
451 452 greater than zero, the daylight savings time offset if used. If \fBtm_isdst\fR
452 453 is negative, no characters are returned.
453 454 .RE
454 455
455 456 .sp
456 457 .ne 2
457 458 .na
458 459 \fB\fB%Z\fR\fR
459 460 .ad
460 461 .RS 6n
461 462 Time zone name or abbreviation, or no bytes if no time zone information exists.
462 463 .RE
↓ open down ↓ |
389 lines elided |
↑ open up ↑ |
463 464
464 465 .sp
465 466 .ne 2
466 467 .na
467 468 \fB\fB%+\fR\fR
468 469 .ad
469 470 .RS 6n
470 471 Locale's date and time representation as produced by \fBdate\fR(1).
471 472 .RE
472 473
473 -.sp
474 474 .LP
475 475 If a conversion specification does not correspond to any of the above or to any
476 476 of the modified conversion specifications listed below, the behavior is
477 477 undefined and \fB0\fR is returned.
478 -.sp
479 478 .LP
480 479 The difference between \fB%U\fR and \fB%W\fR (and also between modified
481 480 conversion specifications \fB%OU\fR and \fB%OW\fR) lies in which day is counted
482 481 as the first of the week. Week number 1 is the first week in January starting
483 482 with a Sunday for \fB%U\fR or a Monday for \fB%W\fR. Week number 0 contains
484 483 those days before the first Sunday or Monday in January for \fB%U\fR and
485 484 \fB%W\fR, respectively.
486 485 .SS "Modified Conversion Specifications"
487 -.sp
488 486 .LP
489 487 Some conversion specifications can be modified by the \fBE\fR and \fBO\fR
490 488 modifiers to indicate that an alternate format or specification should be used
491 489 rather than the one normally used by the unmodified conversion specification.
492 490 If the alternate format or specification does not exist in the current locale,
493 491 the behavior will be as if the unmodified specification were used.
494 492 .sp
495 493 .ne 2
496 494 .na
497 495 \fB\fB%Ec\fR\fR
498 496 .ad
499 497 .RS 7n
500 498 Locale's alternate appropriate date and time representation.
501 499 .RE
502 500
503 501 .sp
504 502 .ne 2
505 503 .na
506 504 \fB\fB%EC\fR\fR
507 505 .ad
508 506 .RS 7n
509 507 Name of the base year (period) in the locale's alternate representation.
510 508 .RE
511 509
512 510 .sp
513 511 .ne 2
514 512 .na
515 513 \fB\fB%Eg\fR\fR
516 514 .ad
517 515 .RS 7n
518 516 Offset from \fB%EC\fR of the week-based year in the locale's alternative
519 517 representation.
520 518 .RE
521 519
522 520 .sp
523 521 .ne 2
524 522 .na
525 523 \fB\fB%EG\fR\fR
526 524 .ad
527 525 .RS 7n
528 526 Full alternative representation of the week-based year.
529 527 .RE
530 528
531 529 .sp
532 530 .ne 2
533 531 .na
534 532 \fB\fB%Ex\fR\fR
535 533 .ad
536 534 .RS 7n
537 535 Locale's alternate date representation.
538 536 .RE
539 537
540 538 .sp
541 539 .ne 2
542 540 .na
543 541 \fB\fB%EX\fR\fR
544 542 .ad
545 543 .RS 7n
546 544 Locale's alternate time representation.
547 545 .RE
548 546
549 547 .sp
550 548 .ne 2
551 549 .na
552 550 \fB\fB%Ey\fR\fR
553 551 .ad
554 552 .RS 7n
555 553 Offset from \fB%EC\fR (year only) in the locale's alternate representation.
556 554 .RE
557 555
558 556 .sp
559 557 .ne 2
560 558 .na
561 559 \fB\fB%EY\fR\fR
562 560 .ad
563 561 .RS 7n
564 562 Full alternate year representation.
565 563 .RE
566 564
567 565 .sp
568 566 .ne 2
569 567 .na
570 568 \fB\fB%Od\fR\fR
571 569 .ad
572 570 .RS 7n
573 571 Day of the month using the locale's alternate numeric symbols.
574 572 .RE
575 573
576 574 .sp
577 575 .ne 2
578 576 .na
579 577 \fB\fB%Oe\fR\fR
580 578 .ad
581 579 .RS 7n
582 580 Same as \fB%Od\fR.
583 581 .RE
584 582
585 583 .sp
586 584 .ne 2
587 585 .na
588 586 \fB\fB%Og\fR\fR
589 587 .ad
590 588 .RS 7n
591 589 Week-based year (offset from \fB%C\fR) in the locale's alternate representation
592 590 and using the locale's alternate numeric symbols.
593 591 .RE
594 592
595 593 .sp
596 594 .ne 2
597 595 .na
598 596 \fB\fB%OH\fR\fR
599 597 .ad
600 598 .RS 7n
601 599 Hour (24-hour clock) using the locale's alternate numeric symbols.
602 600 .RE
603 601
604 602 .sp
605 603 .ne 2
606 604 .na
607 605 \fB\fB%OI\fR\fR
608 606 .ad
609 607 .RS 7n
610 608 Hour (12-hour clock) using the locale's alternate numeric symbols.
611 609 .RE
612 610
613 611 .sp
614 612 .ne 2
615 613 .na
616 614 \fB\fB%Om\fR\fR
617 615 .ad
618 616 .RS 7n
619 617 Month using the locale's alternate numeric symbols.
620 618 .RE
621 619
622 620 .sp
623 621 .ne 2
624 622 .na
625 623 \fB\fB%OM\fR\fR
626 624 .ad
627 625 .RS 7n
628 626 Minutes using the locale's alternate numeric symbols.
629 627 .RE
630 628
631 629 .sp
632 630 .ne 2
633 631 .na
634 632 \fB\fB%OS\fR\fR
635 633 .ad
636 634 .RS 7n
637 635 Seconds using the locale's alternate numeric symbols.
638 636 .RE
639 637
640 638 .sp
641 639 .ne 2
642 640 .na
643 641 \fB\fB%Ou\fR\fR
644 642 .ad
645 643 .RS 7n
646 644 Weekday as a number in the locale's alternate numeric symbols.
647 645 .RE
648 646
649 647 .sp
650 648 .ne 2
651 649 .na
652 650 \fB\fB%OU\fR\fR
653 651 .ad
654 652 .RS 7n
655 653 Week number of the year (Sunday as the first day of the week) using the
656 654 locale's alternate numeric symbols.
657 655 .RE
658 656
659 657 .sp
660 658 .ne 2
661 659 .na
662 660 \fB\fB%Ow\fR\fR
663 661 .ad
664 662 .RS 7n
665 663 Number of the weekday (Sunday=0) using the locale's alternate numeric symbols.
666 664 .RE
667 665
668 666 .sp
669 667 .ne 2
670 668 .na
671 669 \fB\fB%OW\fR\fR
672 670 .ad
673 671 .RS 7n
674 672 Week number of the year (Monday as the first day of the week) using the
675 673 locale's alternate numeric symbols.
676 674 .RE
677 675
678 676 .sp
↓ open down ↓ |
181 lines elided |
↑ open up ↑ |
679 677 .ne 2
680 678 .na
681 679 \fB\fB%Oy\fR\fR
682 680 .ad
683 681 .RS 7n
684 682 Year (offset from \fB%C\fR) in the locale's alternate representation and using
685 683 the locale's alternate numeric symbols.
686 684 .RE
687 685
688 686 .SS "Selecting the Output Language"
689 -.sp
690 687 .LP
691 -By default, the output of \fBstrftime()\fR, \fBcftime()\fR, and
692 -\fBascftime()\fR appear in U.S. English. The user can request that the output
693 -of \fBstrftime()\fR, \fBcftime()\fR, or \fBascftime()\fR be in a specific
694 -language by setting the \fBLC_TIME\fR category using \fBsetlocale()\fR.
688 +These routines produce output that is formatted according to the \fBLC_TIME\fR
689 +locale category. They use either the current locale, or in the case of
690 +\fBstrftime_l()\fR, the locale supplied by \fIloc\fR.
695 691 .SS "Time Zone"
696 -.sp
697 692 .LP
698 693 Local time zone information is used as though \fBtzset\fR(3C) were called.
699 694 .SH RETURN VALUES
700 -.sp
701 695 .LP
702 -The \fBstrftime()\fR, \fBcftime()\fR, and \fBascftime()\fR functions return the
696 +These functions return the
703 697 number of characters placed into the array pointed to by \fIs\fR, not including
704 698 the terminating null character. If the total number of resulting characters
705 699 including the terminating null character is more than \fImaxsize\fR,
706 700 \fBstrftime()\fR returns \fB0\fR and the contents of the array are
707 701 indeterminate.
708 702 .SH EXAMPLES
709 703 .LP
710 704 \fBExample 1 \fRAn example of the \fBstrftime()\fR function.
711 -.sp
712 705 .LP
713 706 The following example illustrates the use of \fBstrftime()\fR for the
714 707 \fBPOSIX\fR locale. It shows what the string in \fIstr\fR would look like if
715 708 the structure pointed to by \fItmptr\fR contains the values corresponding to
716 709 Thursday, August 28, 1986 at 12:44:36.
717 -
718 -.sp
719 -.in +2
720 710 .nf
721 -\fBstrftime (str, strsize, "%A %b %d %j", tmptr)\fR
711 +.IP
712 +\fBstrftime\fR(\fIstr\fR, \fIstrsize\fR, "%A %b %d %j", \fItmptr\fR);
722 713 .fi
723 -.in -2
724 -
725 -.sp
726 714 .LP
727 715 This results in \fIstr\fR containing "Thursday Aug 28 240".
728 -
729 716 .SH ATTRIBUTES
730 -.sp
731 717 .LP
732 718 See \fBattributes\fR(5) for descriptions of the following attributes:
733 -.sp
734 -
735 -.sp
736 719 .TS
737 720 box;
738 721 c | c
739 722 l | l .
740 723 ATTRIBUTE TYPE ATTRIBUTE VALUE
741 724 _
742 725 CSI Enabled
743 726 _
744 -Interface Stability Committed
727 +Interface Stability See below.
745 728 _
746 729 MT-Level MT-Safe
747 730 _
748 731 Standard See below.
749 732 .TE
750 733
751 -.sp
752 734 .LP
753 -For \fBstrftime()\fR, see \fBstandards\fR(5).
735 +The \fBstrftime()\fR and \fBstrftime_l()\fR functions are Standard.
736 +\fBcftime()\fR and \fBascftime()\fR functions are Committed.
737 +.LP
738 +For \fBstrftime()\fR and \fBstrftime_l()\fR, see \fBstandards\fR(5).
754 739 .SH SEE ALSO
755 -.sp
756 740 .LP
757 -\fBdate\fR(1), \fBctime\fR(3C), \fBmktime\fR(3C), \fBsetlocale\fR(3C),
758 -\fBstrptime\fR(3C), \fBtzset\fR(3C), \fBTIMEZONE\fR(4), \fBzoneinfo\fR(4),
741 +\fBdate\fR(1), \fBctime\fR(3C), \fBmktime\fR(3C),
742 +\fBnewlocale\fR(3C), \fBsetlocale\fR(3C), \fBstrptime\fR(3C), \fBtzset\fR(3C),
743 +\fBuselocale\fR(3C), \fBTIMEZONE\fR(4), \fBzoneinfo\fR(4),
759 744 \fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5)
760 745 .SH NOTES
761 -.sp
762 746 .LP
763 747 The conversion specification for \fB%V\fR was changed in the Solaris 7 release.
764 748 This change was based on the public review draft of the ISO C9x standard at
765 749 that time. Previously, the specification stated that if the week containing 1
766 750 January had fewer than four days in the new year, it became week 53 of the
767 751 previous year. The ISO C9x standard committee subsequently recognized that that
768 752 specification had been incorrect.
769 -.sp
770 753 .LP
771 754 The conversion specifications for \fB%g\fR, \fB%G\fR, \fB%Eg\fR, \fB%EG\fR, and
772 755 \fB%Og\fR were added in the Solaris 7 release. This change was based on the
773 -public review draft of the ISO C9x standard at that time. These specifications
774 -are evolving. If the ISO C9x standard is finalized with a different
775 -conclusion, these specifications will change to conform to the ISO C9x standard
776 -decision.
777 -.sp
756 +public review draft of the ISO C9x standard at that time. The \fB%g\fR and
757 +\fB%G\fR specifications were adopted in the formal standard. The other two
758 +were not, and should not be used in portable applications.
778 759 .LP
779 760 The conversion specification for \fB%u\fR was changed in the Solaris 8 release.
780 761 This change was based on the XPG4 specification.
781 -.sp
782 762 .LP
783 763 If using the \fB%Z\fR specifier and \fBzoneinfo\fR timezones and if the input
784 764 date is outside the range 20:45:52 UTC, December 13, 1901 to 03:14:07 UTC,
785 765 January 19, 2038, the timezone name may not be correct.
786 -.sp
787 766 .LP
788 767 The conversion specification for \fB%+\fR was added in illumos.
789 768 It is not part of any standard, although it is available on a number
790 769 of other platforms.
791 770 Its use is discouraged for conforming applications.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX