[ < ] | [ > ] | [ << ] | [Plus haut] | [ >> ] | [Top] | [Table des matières] | [Index] | [ ? ] |
These functions convert time values (lists of two or three integers) to text in a string, and vice versa.
This function parses the time-string string and returns the corresponding time value.
This function converts time (or the current time, if time is omitted) to a string according to format-string. The argument format-string may contain ‘%’-sequences which say to substitute parts of the time. Here is a table of what the ‘%’-sequences mean:
This stands for the abbreviated name of the day of week.
This stands for the full name of the day of week.
This stands for the abbreviated name of the month.
This stands for the full name of the month.
This is a synonym for ‘%x %X’.
This has a locale-specific meaning. In the default locale (named C), it is equivalent to ‘%A, %B %e, %Y’.
This stands for the day of month, zero-padded.
This is a synonym for ‘%m/%d/%y’.
This stands for the day of month, blank-padded.
This is a synonym for ‘%b’.
This stands for the hour (00-23).
This stands for the hour (01-12).
This stands for the day of the year (001-366).
This stands for the hour (0-23), blank padded.
This stands for the hour (1-12), blank padded.
This stands for the month (01-12).
This stands for the minute (00-59).
This stands for a newline.
This stands for ‘AM’ or ‘PM’, as appropriate.
This is a synonym for ‘%I:%M:%S %p’.
This is a synonym for ‘%H:%M’.
This stands for the seconds (00-59).
This stands for a tab character.
This is a synonym for ‘%H:%M:%S’.
This stands for the week of the year (01-52), assuming that weeks start on Sunday.
This stands for the numeric day of week (0-6). Sunday is day 0.
This stands for the week of the year (01-52), assuming that weeks start on Monday.
This has a locale-specific meaning. In the default locale (named ‘C’), it is equivalent to ‘%D’.
This has a locale-specific meaning. In the default locale (named ‘C’), it is equivalent to ‘%T’.
This stands for the year without century (00-99).
This stands for the year with century.
This stands for the time zone abbreviation (e.g., ‘EST’).
This stands for the time zone numerical offset (e.g., ‘-0500’).
You can also specify the field width and type of padding for any of these
‘%’-sequences. This works as in printf
: you write the field
width as digits in the middle of a ‘%’-sequences. If you start the
field width with ‘0’, it means to pad with zeros. If you start the
field width with ‘_’, it means to pad with spaces.
For example, ‘%S’ specifies the number of seconds since the minute; ‘%03S’ means to pad this with zeros to 3 positions, ‘%_3S’ to pad with spaces to 3 positions. Plain ‘%3S’ pads with zeros, because that is how ‘%S’ normally pads to two positions.
The characters ‘E’ and ‘O’ act as modifiers when used between
‘%’ and one of the letters in the table above. ‘E’ specifies
using the current locale's “alternative” version of the date and time. In
a Japanese locale, for example, %Ex
might yield a date format based
on the Japanese Emperors' reigns. ‘E’ is allowed in ‘%Ec’,
‘%EC’, ‘%Ex’, ‘%EX’, ‘%Ey’, and ‘%EY’.
‘O’ means to use the current locale's “alternative” representation of numbers, instead of the ordinary decimal digits. This is allowed with most letters, all the ones that output numbers.
If universal is non-nil
, that means to describe the time as
Universal Time; nil
means describe it using what Emacs believes is
the local time zone (see current-time-zone
).
This function uses the C library function strftime
(voir (libc)Formatting Calendar Time section `Formatting Calendar Time' dans The GNU C Library Reference Manual) to do most of
the work. In order to communicate with that function, it first encodes its
argument using the coding system specified by locale-coding-system
(voir la section Locales); after strftime
returns the resulting string,
format-time-string
decodes the string using that same coding system.
This function converts seconds, a floating point number of seconds
since the epoch, to a time value and returns that. To perform the inverse
conversion, use float-time
.
[ < ] | [ > ] | [ << ] | [Plus haut] | [ >> ] | [Top] | [Table des matières] | [Index] | [ ? ] |
Ce document a été généré par Eric Reinbold le 13 Octobre 2007 en utilisant texi2html 1.78.