.\" @(#)localdtconv.3 1.9 90/02/15 SMI
.TH LOCALDTCONV 3 "15 June 1988"
.SH NAME
localdtconv \- get date and time formatting conventions
.SH SYNOPSIS
.B #include <locale.h>
.LP
.B struct dtconv *localdtconv(\|)
.SH DESCRIPTION
.IX "localdtconv()" "" "\fLlocaldtconv()\fR \(em get date and time formatting conventions" ""
.IX "formatting" "dates and times for locale"
.IX "date" "formatting conventions for locale"
.IX "time" "formatting conventions for locale"
.IX locale "date and time formatting conventions"
.LP
.B localdtconv(\|)
returns a pointer to a structure of type
.B "struct dtconv"
containing values appropriate for the formatting of dates and times
according to the rules of the current locale.
.LP
The members include the following:
.TP
.B "char *abbrev_month_names[12]"
The abbreviated names of the months; for example,
the abbreviated name for January is
.B "abbrev_month_names[0]"
and the abbreviated name for December is
.BR "abbrev_month_names[11]" .
.TP
.B "char *month_names[12]"
The full names of the months; for example, the full name for January is
.B "month_names[0]"
and the full name for December is
.BR "month_names[11]" .
.TP
.B "char *abbrev_weekday_names[7]"
The abbreviated names of the weekdays; for
example, the abbreviated name for Sunday is
.B "abbrev_weekday_names[0]"
and the abbreviated name for Saturday is
.BR "abbrev_weekday_names[6]" .
.TP
.B "char *weekday_names[7]"
The full names of the weekdays; for example, the full name for Sunday is
.B "weekday_names[0]"
and the full name for Saturday is
.BR "weekday_names[6]" .
.TP
.B "char *time_format"
The standard format for times, using the format specifiers supported by
.B strftime(\|)
and
.B strptime(\|)
(see
.BR ctime (3V)).
.TP
.B "char *sdate_format"
The standard short format for dates, using the format specifiers supported by
.B ctime (3V).
.TP
.B "char *dtime_format"
The standard short format for dates and times together,
using the format specifiers supported by
.BR ctime (3V).
.TP
.B "char *am_string"
The string representing
.SM AM\s0.
.TP
.B "char *pm_string"
The string representing
.SM PM\s0.
.TP
.B "char *ldate_format"
The standard long format for dates, using the format specifiers supported by
.BR ctime (3V).
.LP
The values for the members in the C locale are:
.RS
.TP 25
.B abbrev_month_names
.BR Jan ,
.BR Feb ,
.BR Mar ,
.BR Apr ,
.BR May ,
.BR Jun ,
.BR Jul ,
.BR Aug ,
.BR Sep ,
.BR Oct ,
.BR Nov ,
.B Dec
.TP
.B month_names
.BR January ,
.BR February ,
.BR March ,
.BR April ,
.BR May ,
.BR June ,
.BR July ,
.BR August ,
.BR September ,
.BR October ,
.BR November ,
.B December
.TP
.B abbrev_weekday_names
.BR Sun ,
.BR Mon ,
.BR Tue ,
.BR Wed ,
.BR Thu ,
.BR Fri ,
.B Sat
.TP
.B weekday_names
.BR Sunday ,
.BR Monday ,
.BR Tuesday ,
.BR Wednesday ,
.BR Thursday ,
.BR Friday ,
.B Saturday
.TP
.B time_format
.B %H:%M:%S
.TP
.B sdate_format
.B %m/%d/%y
.TP
.B dtime_format
.B "%a %b %e %T %Z %Y"
.TP
.B am_string
.SB AM
.TP
.B pm_string
.SB PM
.TP
.B ldate_format
.B "%A, %B %e, %Y"
.RE
.SH FILES
.PD 0
.TP 20
.B /usr/share/lib/locale/\s-1LC_TIME\s0
standard locale information directory for category
.SB LC_TIME
.SH "SEE ALSO"
.BR ctime (3V),
.BR setlocale (3V)
