diff options
| author | Luc Teirlinck | 2004-07-09 23:38:54 +0000 |
|---|---|---|
| committer | Luc Teirlinck | 2004-07-09 23:38:54 +0000 |
| commit | 5668fbb8b1b555208ea82664ee4ecbbf3833467d (patch) | |
| tree | f3984e4333fca06d7d3ed9226ad2d61b73327f12 /src/editfns.c | |
| parent | 80a7a1bff5f11ce9635e7d28398d0874a68a410a (diff) | |
| download | emacs-5668fbb8b1b555208ea82664ee4ecbbf3833467d.tar.gz emacs-5668fbb8b1b555208ea82664ee4ecbbf3833467d.zip | |
(Ffloat_time, Fformat_time_string, Fdecode_time)
(Fcurrent_time_string, Fcurrent_time_zone): Mention in docstrings
that time values of the type (HIGH . LOW) are considered obsolete.
Diffstat (limited to 'src/editfns.c')
| -rw-r--r-- | src/editfns.c | 59 |
1 files changed, 29 insertions, 30 deletions
diff --git a/src/editfns.c b/src/editfns.c index 9fbdc0363bb..a506c5f4fc8 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -1431,10 +1431,10 @@ lisp_time_argument (specified_time, result, usec) | |||
| 1431 | DEFUN ("float-time", Ffloat_time, Sfloat_time, 0, 1, 0, | 1431 | DEFUN ("float-time", Ffloat_time, Sfloat_time, 0, 1, 0, |
| 1432 | doc: /* Return the current time, as a float number of seconds since the epoch. | 1432 | doc: /* Return the current time, as a float number of seconds since the epoch. |
| 1433 | If SPECIFIED-TIME is given, it is the time to convert to float | 1433 | If SPECIFIED-TIME is given, it is the time to convert to float |
| 1434 | instead of the current time. The argument should have the forms: | 1434 | instead of the current time. The argument should have the form |
| 1435 | (HIGH . LOW) or (HIGH LOW USEC) or (HIGH LOW . USEC). | 1435 | (HIGH LOW . IGNORED). Thus, you can use times obtained from |
| 1436 | Thus, you can use times obtained from `current-time' | 1436 | `current-time' and from `file-attributes'. SPECIFIED-TIME can also |
| 1437 | and from `file-attributes'. | 1437 | have the form (HIGH . LOW), but this is considered obsolete. |
| 1438 | 1438 | ||
| 1439 | WARNING: Since the result is floating point, it may not be exact. | 1439 | WARNING: Since the result is floating point, it may not be exact. |
| 1440 | Do not use this function if precise time stamps are required. */) | 1440 | Do not use this function if precise time stamps are required. */) |
| @@ -1506,8 +1506,9 @@ emacs_memftimeu (s, maxsize, format, format_len, tp, ut) | |||
| 1506 | 1506 | ||
| 1507 | DEFUN ("format-time-string", Fformat_time_string, Sformat_time_string, 1, 3, 0, | 1507 | DEFUN ("format-time-string", Fformat_time_string, Sformat_time_string, 1, 3, 0, |
| 1508 | doc: /* Use FORMAT-STRING to format the time TIME, or now if omitted. | 1508 | doc: /* Use FORMAT-STRING to format the time TIME, or now if omitted. |
| 1509 | TIME is specified as (HIGH LOW . IGNORED) or (HIGH . LOW), as returned by | 1509 | TIME is specified as (HIGH LOW . IGNORED), as returned by |
| 1510 | `current-time' or `file-attributes'. | 1510 | `current-time' or `file-attributes'. The obsolete form (HIGH . LOW) |
| 1511 | is also still accepted. | ||
| 1511 | The third, optional, argument UNIVERSAL, if non-nil, means describe TIME | 1512 | The third, optional, argument UNIVERSAL, if non-nil, means describe TIME |
| 1512 | as Universal Time; nil means describe TIME in the local time zone. | 1513 | as Universal Time; nil means describe TIME in the local time zone. |
| 1513 | The value is a copy of FORMAT-STRING, but with certain constructs replaced | 1514 | The value is a copy of FORMAT-STRING, but with certain constructs replaced |
| @@ -1603,17 +1604,19 @@ For example, to produce full ISO 8601 format, use "%Y-%m-%dT%T%z". */) | |||
| 1603 | 1604 | ||
| 1604 | DEFUN ("decode-time", Fdecode_time, Sdecode_time, 0, 1, 0, | 1605 | DEFUN ("decode-time", Fdecode_time, Sdecode_time, 0, 1, 0, |
| 1605 | doc: /* Decode a time value as (SEC MINUTE HOUR DAY MONTH YEAR DOW DST ZONE). | 1606 | doc: /* Decode a time value as (SEC MINUTE HOUR DAY MONTH YEAR DOW DST ZONE). |
| 1606 | The optional SPECIFIED-TIME should be a list of (HIGH LOW . IGNORED) | 1607 | The optional SPECIFIED-TIME should be a list of (HIGH LOW . IGNORED), |
| 1607 | or (HIGH . LOW), as from `current-time' and `file-attributes', or `nil' | 1608 | as from `current-time' and `file-attributes', or `nil' to use the |
| 1608 | to use the current time. The list has the following nine members: | 1609 | current time. The obsolete form (HIGH . LOW) is also still accepted. |
| 1609 | SEC is an integer between 0 and 60; SEC is 60 for a leap second, which | 1610 | The list has the following nine members: SEC is an integer between 0 |
| 1610 | only some operating systems support. MINUTE is an integer between 0 and 59. | 1611 | and 60; SEC is 60 for a leap second, which only some operating systems |
| 1611 | HOUR is an integer between 0 and 23. DAY is an integer between 1 and 31. | 1612 | support. MINUTE is an integer between 0 and 59. HOUR is an integer |
| 1612 | MONTH is an integer between 1 and 12. YEAR is an integer indicating the | 1613 | between 0 and 23. DAY is an integer between 1 and 31. MONTH is an |
| 1613 | four-digit year. DOW is the day of week, an integer between 0 and 6, where | 1614 | integer between 1 and 12. YEAR is an integer indicating the |
| 1614 | 0 is Sunday. DST is t if daylight savings time is effect, otherwise nil. | 1615 | four-digit year. DOW is the day of week, an integer between 0 and 6, |
| 1615 | ZONE is an integer indicating the number of seconds east of Greenwich. | 1616 | where 0 is Sunday. DST is t if daylight savings time is effect, |
| 1616 | (Note that Common Lisp has different meanings for DOW and ZONE.) */) | 1617 | otherwise nil. ZONE is an integer indicating the number of seconds |
| 1618 | east of Greenwich. (Note that Common Lisp has different meanings for | ||
| 1619 | DOW and ZONE.) */) | ||
| 1617 | (specified_time) | 1620 | (specified_time) |
| 1618 | Lisp_Object specified_time; | 1621 | Lisp_Object specified_time; |
| 1619 | { | 1622 | { |
| @@ -1745,13 +1748,11 @@ The format is `Sun Sep 16 01:03:52 1973'. | |||
| 1745 | However, see also the functions `decode-time' and `format-time-string' | 1748 | However, see also the functions `decode-time' and `format-time-string' |
| 1746 | which provide a much more powerful and general facility. | 1749 | which provide a much more powerful and general facility. |
| 1747 | 1750 | ||
| 1748 | If SPECIFIED-TIME is given, it is a time to format instead | 1751 | If SPECIFIED-TIME is given, it is a time to format instead of the |
| 1749 | of the current time. The argument should have the form: | 1752 | current time. The argument should have the form (HIGH LOW . IGNORED). |
| 1750 | (HIGH . LOW) | 1753 | Thus, you can use times obtained from `current-time' and from |
| 1751 | or the form: | 1754 | `file-attributes'. SPECIFIED-TIME can also have the form (HIGH . LOW), |
| 1752 | (HIGH LOW . IGNORED). | 1755 | but this is considered obsolete. */) |
| 1753 | Thus, you can use times obtained from `current-time' | ||
| 1754 | and from `file-attributes'. */) | ||
| 1755 | (specified_time) | 1756 | (specified_time) |
| 1756 | Lisp_Object specified_time; | 1757 | Lisp_Object specified_time; |
| 1757 | { | 1758 | { |
| @@ -1802,12 +1803,10 @@ OFFSET is an integer number of seconds ahead of UTC (east of Greenwich). | |||
| 1802 | A negative value means west of Greenwich. | 1803 | A negative value means west of Greenwich. |
| 1803 | NAME is a string giving the name of the time zone. | 1804 | NAME is a string giving the name of the time zone. |
| 1804 | If SPECIFIED-TIME is given, the time zone offset is determined from it | 1805 | If SPECIFIED-TIME is given, the time zone offset is determined from it |
| 1805 | instead of using the current time. The argument should have the form: | 1806 | instead of using the current time. The argument should have the form |
| 1806 | (HIGH . LOW) | 1807 | (HIGH LOW . IGNORED). Thus, you can use times obtained from |
| 1807 | or the form: | 1808 | `current-time' and from `file-attributes'. SPECIFIED-TIME can also |
| 1808 | (HIGH LOW . IGNORED). | 1809 | have the form (HIGH . LOW), but this is considered obsolete. |
| 1809 | Thus, you can use times obtained from `current-time' | ||
| 1810 | and from `file-attributes'. | ||
| 1811 | 1810 | ||
| 1812 | Some operating systems cannot provide all this information to Emacs; | 1811 | Some operating systems cannot provide all this information to Emacs; |
| 1813 | in this case, `current-time-zone' returns a list containing nil for | 1812 | in this case, `current-time-zone' returns a list containing nil for |